From c7614200551d6a9bfcd09aa9af70b5ccbea17aa7 Mon Sep 17 00:00:00 2001 From: Maxime Coste Date: Fri, 2 Dec 2011 19:00:37 +0000 Subject: [PATCH] fix exec_commands_in_file --- src/main.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main.cc b/src/main.cc index 3b290854..5ad98e0f 100644 --- a/src/main.cc +++ b/src/main.cc @@ -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;