From 81b53b36c815f351f460377b0472e163922c0503 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 07be966052..ba990e2be1 100644 --- a/src/script/script_config.cpp +++ b/src/script/script_config.cpp @@ -215,7 +215,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 */