Fix line ending bug for downloaded gecko codes

This commit is contained in:
mimimi085181 2015-06-06 15:50:05 +02:00
parent f9b5571ddd
commit bd5e55bc59

View file

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