Skip to content
Snippets Groups Projects
Commit 39b96226 authored by Giovanni Bussi's avatar Giovanni Bussi
Browse files

Fix #223

parent 99a66e2f
No related branches found
No related tags found
No related merge requests found
...@@ -197,6 +197,7 @@ bool Tools::getline(FILE* fp,string & line){ ...@@ -197,6 +197,7 @@ bool Tools::getline(FILE* fp,string & line){
if(ss>0) if(buffer[ss-1]=='\n') break; if(ss>0) if(buffer[ss-1]=='\n') break;
}; };
if(line.length()>0) if(*(line.end()-1)=='\n') line.erase(line.end()-1); if(line.length()>0) if(*(line.end()-1)=='\n') line.erase(line.end()-1);
if(line.length()>0) if(*(line.end()-1)=='\r') line.erase(line.end()-1);
return ret; return ret;
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment