summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMaxime Coste <frrrwww@gmail.com>2011-12-02 19:00:37 +0000
committerMaxime Coste <frrrwww@gmail.com>2011-12-02 19:00:37 +0000
commitc7614200551d6a9bfcd09aa9af70b5ccbea17aa7 (patch)
treefc478ea9e707fef527863f758a015ccbc30824be /src
parent11d606f79e8a848321122e0e57270ba5a38c582c (diff)
fix exec_commands_in_file
Diffstat (limited to 'src')
-rw-r--r--src/main.cc2
1 files changed, 1 insertions, 1 deletions
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;