Skip to content

Commit

Permalink
fix win98 build
Browse files Browse the repository at this point in the history
  • Loading branch information
pionere committed Sep 30, 2023
1 parent 10280af commit 0fe509f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions Source/storm/storm_cfg.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ void ConfigSection::delEntry(const char* name)

ConfigEntry* ConfigSection::addEntry(const char* key, const char* value)
{
entries.push_back(ConfigEntry(SDL_strdup(key), SDL_strdup(value)));
entries.push_back(ConfigEntry(strdup(key), strdup(value)));
return &entries.back();
}

Expand All @@ -91,7 +91,7 @@ static ConfigSection* getSection(const char* name)

static ConfigSection* addSection(const char* name)
{
config.sections.push_back(ConfigSection(SDL_strdup(name)));
config.sections.push_back(ConfigSection(strdup(name)));

return &config.sections.back();
}
Expand Down Expand Up @@ -268,7 +268,7 @@ void setIniValue(const char* sectionName, const char* keyName, const char* value
if (SDL_strcmp(value, entry->value) == 0)
return;
free(const_cast<char*>(entry->value));
entry->value = SDL_strdup(value);
entry->value = strdup(value);
}
config.modified = true;
}
Expand Down
6 changes: 3 additions & 3 deletions tools/patcher/storm/storm_cfg.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ ConfigEntry* ConfigSection::getEntry(const char* name)

ConfigEntry* ConfigSection::addEntry(const char* key, const char* value)
{
entries.push_back(ConfigEntry(SDL_strdup(key), SDL_strdup(value)));
entries.push_back(ConfigEntry(strdup(key), strdup(value)));
return &entries.back();
}

Expand All @@ -71,7 +71,7 @@ static ConfigSection* getSection(const char* name)

static ConfigSection* addSection(const char* name)
{
config.sections.push_back(ConfigSection(SDL_strdup(name)));
config.sections.push_back(ConfigSection(strdup(name)));

return &config.sections.back();
}
Expand Down Expand Up @@ -248,7 +248,7 @@ void setIniValue(const char* sectionName, const char* keyName, const char* value
if (SDL_strcmp(value, entry->value) == 0)
return;
free(const_cast<char*>(entry->value));
entry->value = SDL_strdup(value);
entry->value = strdup(value);
}
config.modified = true;
}
Expand Down

0 comments on commit 0fe509f

Please sign in to comment.