diff options
Diffstat (limited to 'src/script/script_config.cpp')
-rw-r--r-- | src/script/script_config.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/script/script_config.cpp b/src/script/script_config.cpp index 768ff5e21..a6e41476e 100644 --- a/src/script/script_config.cpp +++ b/src/script/script_config.cpp @@ -21,7 +21,7 @@ void ScriptConfig::Change(const char *name, int version, bool force_exact_match, bool is_random) { free(this->name); - this->name = (name == NULL) ? NULL : strdup(name); + this->name = (name == NULL) ? NULL : stredup(name); this->info = (name == NULL) ? NULL : this->FindInfo(this->name, version, force_exact_match); this->version = (info == NULL) ? -1 : info->GetVersion(); this->is_random = is_random; @@ -45,14 +45,14 @@ void ScriptConfig::Change(const char *name, int version, bool force_exact_match, ScriptConfig::ScriptConfig(const ScriptConfig *config) { - this->name = (config->name == NULL) ? NULL : strdup(config->name); + this->name = (config->name == NULL) ? NULL : stredup(config->name); this->info = config->info; this->version = config->version; this->config_list = NULL; this->is_random = config->is_random; for (SettingValueList::const_iterator it = config->settings.begin(); it != config->settings.end(); it++) { - this->settings[strdup((*it).first)] = (*it).second; + this->settings[stredup((*it).first)] = (*it).second; } this->AddRandomDeviation(); } @@ -117,7 +117,7 @@ void ScriptConfig::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; } } @@ -160,7 +160,7 @@ int ScriptConfig::GetVersion() const void ScriptConfig::StringToSettings(const char *value) { - char *value_copy = strdup(value); + char *value_copy = stredup(value); char *s = value_copy; while (s != NULL) { |