Skip to content

Commit

Permalink
readd equal operator for enabled int
Browse files Browse the repository at this point in the history
  • Loading branch information
PaideiaDilemma committed Jan 2, 2025
1 parent 18bbbe9 commit d2f9ba3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/config/ConfigManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2038,7 +2038,7 @@ std::optional<std::string> CConfigManager::handleAnimation(const std::string& co
return "no such animation";

// This helper casts strings like "1", "true", "off", "yes"... to int.
int64_t enabledInt = configStringToInt(ARGS[1]).value_or(0);
int64_t enabledInt = configStringToInt(ARGS[1]).value_or(0) == 1;

// Checking that the int is 1 or 0 because the helper can return integers out of range.
if (enabledInt != 0 && enabledInt != 1)
Expand Down

0 comments on commit d2f9ba3

Please sign in to comment.