fix exec_commands_in_file

This commit is contained in:
Maxime Coste 2011-12-02 19:00:37 +00:00
parent 11d606f79e
commit c761420055

View File

@ -516,7 +516,7 @@ void exec_commands_in_file(const CommandParameters& params,
while (true)
{
size_t end_pos = file_content.find_first_of('\n', pos);
cmd_manager.execute(file_content.substr(pos, end_pos), context);
cmd_manager.execute(file_content.substr(pos, end_pos - pos), context);
if (end_pos == std::string::npos)
break;
pos = end_pos + 1;