Merge pull request #13883 from iota97/cheat-newline

Fix adding extra new line on checkbox change
This commit is contained in:
Henrik Rydgård 2021-01-06 10:43:44 +01:00 committed by GitHub
commit 0e5558b2f2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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();