summaryrefslogtreecommitdiff
path: root/init/action.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'init/action.cpp')
-rw-r--r--init/action.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/init/action.cpp b/init/action.cpp
index e9b2a0dfe..acbb12e8e 100644
--- a/init/action.cpp
+++ b/init/action.cpp
@@ -105,7 +105,10 @@ std::size_t Action::NumCommands() const {
}
void Action::ExecuteOneCommand(std::size_t command) const {
- ExecuteCommand(commands_[command]);
+ // We need a copy here since some Command execution may result in
+ // changing commands_ vector by importing .rc files through parser
+ Command cmd = commands_[command];
+ ExecuteCommand(cmd);
}
void Action::ExecuteAllCommands() const {