mirror of https://github.com/OpenTTD/OpenTTD.git
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:
parent
fde7028a95
commit
bb2ac8b3c4
|
@ -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 */
|
||||
|
|
Loading…
Reference in New Issue