Skip to content

Commit

Permalink
Fix line ending bug for downloaded gecko codes
Browse files Browse the repository at this point in the history
  • Loading branch information
mimimi085181 committed Jun 6, 2015
1 parent f9b5571 commit bd5e55b
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions Source/Core/DolphinWX/Cheats/GeckoCodeDiag.cpp
Expand Up @@ -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())
Expand Down

0 comments on commit bd5e55b

Please sign in to comment.