diff options
author | Vaxry <[email protected]> | 2024-11-20 10:32:50 +0000 |
---|---|---|
committer | Vaxry <[email protected]> | 2024-11-20 10:32:50 +0000 |
commit | e5fa017172156fa5c70fedeaee5f51eace9577c0 (patch) | |
tree | 19a59d9b02f6c50a78446c9c3cb28a4ec464dd26 /src/config | |
parent | c4eda46d0ef022a17348623beec4154ba34af691 (diff) | |
download | Hyprland-e5fa017172156fa5c70fedeaee5f51eace9577c0.tar.gz Hyprland-e5fa017172156fa5c70fedeaee5f51eace9577c0.zip |
internal: fix some misused configStringToInt conversions
fixes #8523
Diffstat (limited to 'src/config')
-rw-r--r-- | src/config/ConfigManager.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/config/ConfigManager.cpp b/src/config/ConfigManager.cpp index fe80a5ab..357e7a60 100644 --- a/src/config/ConfigManager.cpp +++ b/src/config/ConfigManager.cpp @@ -2101,13 +2101,13 @@ std::optional<std::string> CConfigManager::handleAnimation(const std::string& co PANIM->second.pValues = &PANIM->second; // This helper casts strings like "1", "true", "off", "yes"... to int. - int64_t enabledInt = configStringToInt(ARGS[1]) == 1; + 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) return "invalid animation on/off state"; - PANIM->second.internalEnabled = configStringToInt(ARGS[1]) == 1; + PANIM->second.internalEnabled = configStringToInt(ARGS[1]).value_or(0) == 1; if (PANIM->second.internalEnabled) { // speed |