diff --git a/UI/CwCheatScreen.cpp b/UI/CwCheatScreen.cpp index a13ef059d8..2e1d706b48 100644 --- a/UI/CwCheatScreen.cpp +++ b/UI/CwCheatScreen.cpp @@ -328,8 +328,10 @@ bool CwCheatScreen::RebuildCheatFile(int index) { return false; } - for (const auto &line : lines) { - fs << line << '\n'; + for (int i = 0; i < lines.size(); ++i) { + fs << lines[i]; + if (i != lines.size()-1) + fs << '\n'; } fs.close();