From 128acc4410f1799cc29592b5c8ec890c16edabdc Mon Sep 17 00:00:00 2001 From: Miran Date: Mon, 30 Sep 2024 09:05:45 +0200 Subject: [PATCH] Fix INI write opcodes inverted condition result. --- cleo_plugins/IniFiles/IniFiles.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/cleo_plugins/IniFiles/IniFiles.cpp b/cleo_plugins/IniFiles/IniFiles.cpp index 054c27f3..e0d6d6bc 100644 --- a/cleo_plugins/IniFiles/IniFiles.cpp +++ b/cleo_plugins/IniFiles/IniFiles.cpp @@ -59,7 +59,7 @@ class IniFiles char strValue[32]; _itoa(value, strValue, 10); - auto result = WritePrivateProfileString(section, key, strValue, path); + auto result = WritePrivateProfileString(section, key, strValue, path) != 0; OPCODE_CONDITION_RESULT(result); return OR_CONTINUE; @@ -104,7 +104,7 @@ class IniFiles char strValue[32]; sprintf(strValue, "%g", value); - auto result = WritePrivateProfileString(section, key, strValue, path); + auto result = WritePrivateProfileString(section, key, strValue, path) != 0; OPCODE_CONDITION_RESULT(result); return OR_CONTINUE; @@ -145,7 +145,7 @@ class IniFiles OPCODE_READ_PARAM_STRING(section); OPCODE_READ_PARAM_STRING(key); - auto result = WritePrivateProfileString(section, key, strValue, path); + auto result = WritePrivateProfileString(section, key, strValue, path) != 0; OPCODE_CONDITION_RESULT(result); return OR_CONTINUE;