From bb2ac8b3c4c41ac75d88ed0a172ebb2477c4728e Mon Sep 17 00:00:00 2001 From: SamuXarick <43006711+SamuXarick@users.noreply.github.com> Date: Fri, 3 Feb 2023 21:35:21 +0000 Subject: [PATCH] Fix: [Script] Save config item values up to 10 digits + 1 for sign + 1 for termination, enough to fit min and max int --- src/script/script_config.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/script/script_config.cpp b/src/script/script_config.cpp index 738a898a79..7f4cfebb6d 100644 --- a/src/script/script_config.cpp +++ b/src/script/script_config.cpp @@ -216,7 +216,7 @@ std::string ScriptConfig::SettingsToString() const char *s = string; *s = '\0'; for (const auto &item : this->settings) { - char no[10]; + char no[INT32_DIGITS_WITH_SIGN_AND_TERMINATION]; seprintf(no, lastof(no), "%d", item.second); /* Check if the string would fit in the destination */