(svn r26486) -Codechange: replace a number of snprintfs with seprintf
This commit is contained in:
@@ -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;
|
||||
|
Reference in New Issue
Block a user