diff --git a/src/gamelog.cpp b/src/gamelog.cpp --- a/src/gamelog.cpp +++ b/src/gamelog.cpp @@ -483,14 +483,14 @@ void GamelogOldver() * @param oldval old setting value * @param newval new setting value */ -void GamelogSetting(const char *name, int32 oldval, int32 newval) +void GamelogSetting(const std::string &name, int32 oldval, int32 newval) { assert(_gamelog_action_type == GLAT_SETTING); LoggedChange *lc = GamelogChange(GLCT_SETTING); if (lc == nullptr) return; - lc->setting.name = stredup(name); + lc->setting.name = stredup(name.c_str()); lc->setting.oldval = oldval; lc->setting.newval = newval; }