mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2024-09-21 11:51:48 +02:00
Fix line ending bug for downloaded gecko codes
This commit is contained in:
parent
f9b5571ddd
commit
bd5e55bc59
1 changed files with 4 additions and 2 deletions
|
@ -192,8 +192,10 @@ void CodeConfigPanel::DownloadCodes(wxCommandEvent&)
|
||||||
|
|
||||||
while ((std::getline(ss, line).good()))
|
while ((std::getline(ss, line).good()))
|
||||||
{
|
{
|
||||||
// empty line
|
// Remove \r at the end of the line for files using windows line endings, std::getline only removes \n
|
||||||
if (0 == line.size() || line == "\r" || line == "\n") // \r\n checks might not be needed
|
line = StripSpaces(line);
|
||||||
|
|
||||||
|
if (line.empty())
|
||||||
{
|
{
|
||||||
// add the code
|
// add the code
|
||||||
if (gcode.codes.size())
|
if (gcode.codes.size())
|
||||||
|
|
Loading…
Reference in a new issue