From bd5e55bc59ddc7dd214669cc21afc4daea51d2e3 Mon Sep 17 00:00:00 2001 From: mimimi085181 Date: Sat, 6 Jun 2015 15:50:05 +0200 Subject: [PATCH] Fix line ending bug for downloaded gecko codes --- Source/Core/DolphinWX/Cheats/GeckoCodeDiag.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Source/Core/DolphinWX/Cheats/GeckoCodeDiag.cpp b/Source/Core/DolphinWX/Cheats/GeckoCodeDiag.cpp index 08c6a37c0fd9..5aad07b697c8 100644 --- a/Source/Core/DolphinWX/Cheats/GeckoCodeDiag.cpp +++ b/Source/Core/DolphinWX/Cheats/GeckoCodeDiag.cpp @@ -192,8 +192,10 @@ void CodeConfigPanel::DownloadCodes(wxCommandEvent&) while ((std::getline(ss, line).good())) { - // empty line - if (0 == line.size() || line == "\r" || line == "\n") // \r\n checks might not be needed + // Remove \r at the end of the line for files using windows line endings, std::getline only removes \n + line = StripSpaces(line); + + if (line.empty()) { // add the code if (gcode.codes.size())