summaryrefslogtreecommitdiff
path: root/src/script/script_config.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/script/script_config.cpp')
-rw-r--r--src/script/script_config.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/script/script_config.cpp b/src/script/script_config.cpp
index 7842a3a9d..48a1459d9 100644
--- a/src/script/script_config.cpp
+++ b/src/script/script_config.cpp
@@ -14,6 +14,7 @@
#include "../core/random_func.hpp"
#include "script_info.hpp"
#include "../textfile_gui.h"
+#include "../string_func.h"
#include "../safeguards.h"
@@ -188,7 +189,7 @@ void ScriptConfig::SettingsToString(char *string, size_t size) const
string[0] = '\0';
for (SettingValueList::const_iterator it = this->settings.begin(); it != this->settings.end(); it++) {
char no[10];
- snprintf(no, sizeof(no), "%d", (*it).second);
+ seprintf(no, lastof(no), "%d", (*it).second);
/* Check if the string would fit in the destination */
size_t needed_size = strlen((*it).first) + 1 + strlen(no) + 1;