init: fix undefined behavior in ExecuteCommand am: d67a4abc64
am: 279f3d593f
Change-Id: I56f463ed8b8af57993c180181a63e84f0a0eb49e
This commit is contained in:
commit
737d0f5265
2 changed files with 7 additions and 4 deletions
|
|
@ -105,7 +105,10 @@ std::size_t Action::NumCommands() const {
|
||||||
}
|
}
|
||||||
|
|
||||||
void Action::ExecuteOneCommand(std::size_t command) 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 {
|
void Action::ExecuteAllCommands() const {
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue