Merge pull request #2539 from mimimi085181/gecko-codes-line-ending-fix

Fix line ending bug for downloaded gecko codes
This commit is contained in:
comex
2015-06-06 23:12:39 -04:00

View File

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