Process mod in defines

This commit is contained in:
GriffinR 2021-12-19 18:48:06 -05:00 committed by huderlem
parent 7368f443f0
commit a6fb7eaeca
2 changed files with 4 additions and 0 deletions

View file

@ -19,6 +19,7 @@ The **"Breaking Changes"** listed below are changes that have been made in the d
- New events will be placed in the center of the current view of the map. - New events will be placed in the center of the current view of the map.
### Fixed ### Fixed
- Fix % operator in C defines not being evaluated
- Fix tileset palette editor crash that could occur when switching maps or tilesets with it open. - Fix tileset palette editor crash that could occur when switching maps or tilesets with it open.
- Loading wild encounters will now properly preserve the original order, so saving the file will not give huge diffs. - Loading wild encounters will now properly preserve the original order, so saving the file will not give huge diffs.

View file

@ -130,6 +130,7 @@ QMap<QString, int> Token::precedenceMap = QMap<QString, int>(
{ {
{"*", 3}, {"*", 3},
{"/", 3}, {"/", 3},
{"%", 3},
{"+", 4}, {"+", 4},
{"-", 4}, {"-", 4},
{"<<", 5}, {"<<", 5},
@ -194,6 +195,8 @@ int ParseUtil::evaluatePostfix(const QList<Token> &postfix) {
result = op1 * op2; result = op1 * op2;
} else if (token.value == "/") { } else if (token.value == "/") {
result = op1 / op2; result = op1 / op2;
} else if (token.value == "%") {
result = op1 % op2;
} else if (token.value == "+") { } else if (token.value == "+") {
result = op1 + op2; result = op1 + op2;
} else if (token.value == "-") { } else if (token.value == "-") {