Skip to content

Commit

Permalink
C4GameSave: Fix invalid use of fmt::sprintf on a std::format-style fo…
Browse files Browse the repository at this point in the history
…rmat string
  • Loading branch information
Fulgen301 committed Nov 30, 2024
1 parent bd6fcff commit 330586d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/C4GameSave.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,7 @@ bool C4GameSave::SaveDesc(C4Group &hToGroup)

// Save to file
StdStrBuf buf{desc.c_str(), desc.size()};
return !!hToGroup.Add(fmt::sprintf(C4CFN_ScenarioDesc, szLang).c_str(), buf, false, true);
return !!hToGroup.Add(std::vformat(C4CFN_ScenarioDesc, std::make_format_args(szLang)).c_str(), buf, false, true);
}

void C4GameSave::WriteDescLineFeed(std::string &desc)
Expand Down Expand Up @@ -479,7 +479,7 @@ bool C4GameSave::Save(C4Group &hToGroup, bool fKeepGroup)
{
pSaveGroup->Delete(C4CFN_ScenarioTitle);
pSaveGroup->Delete(C4CFN_ScenarioIcon);
pSaveGroup->Delete(fmt::sprintf(C4CFN_ScenarioDesc, "*").c_str());
pSaveGroup->Delete(std::vformat(C4CFN_ScenarioDesc, std::make_format_args("*")).c_str());
pSaveGroup->Delete(C4CFN_Titles);
pSaveGroup->Delete(C4CFN_Info);
}
Expand Down

0 comments on commit 330586d

Please sign in to comment.