Skip to content

Commit

Permalink
fix decrement past beginning iterator
Browse files Browse the repository at this point in the history
  • Loading branch information
FranciscoDA committed Feb 22, 2019
1 parent 7a30e19 commit d925fde
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tools/code_generators/luagamestate_support_gen/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ void iterateDepthFirstByNames(First first, Last last, std::ostream &out, std::st
previousName = std::move(currentName);
}
// set and pop whats left
for (auto itP = --previousName.end(); itP != --previousName.begin(); --itP)
for (auto itP = previousName.rbegin(); itP != previousName.rend(); ++itP)
out << "\tlua_setfield(L, -2, \"" << *itP << "\");\n";
}

Expand Down

0 comments on commit d925fde

Please sign in to comment.