(svn r26509) -Codechange: replace strdup with stredup (the latter ensures the return is not NULL)

This commit is contained in:
rubidium
2014-04-25 15:40:32 +00:00
parent 0b159549d4
commit 034735a54c
70 changed files with 207 additions and 183 deletions

View File

@@ -11,6 +11,7 @@
#include "../stdafx.h"
#include "../settings_type.h"
#include "../string_func.h"
#include "ai.hpp"
#include "ai_config.hpp"
#include "ai_info.hpp"
@@ -109,7 +110,7 @@ void AIConfig::SetSetting(const char *name, int value)
if (it != this->settings.end()) {
(*it).second = value;
} else {
this->settings[strdup(name)] = value;
this->settings[stredup(name)] = value;
}
return;