Fix: [Script] Save config item values up to 10 digits + 1 for sign + 1 for termination, enough to fit min and max int

This commit is contained in:
SamuXarick 2023-02-03 21:35:21 +00:00 committed by Loïc Guilloux
parent fde7028a95
commit bb2ac8b3c4
1 changed files with 1 additions and 1 deletions

View File

@ -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 */