[c][cpp] Ignore return carriage at end of atlas file lines.

This commit is contained in:
badlogic 2018-11-30 16:13:37 +01:00
parent 6d3fc9b3a0
commit 08694b37b3
2 changed files with 4 additions and 4 deletions

View File

@ -70,8 +70,8 @@ static void trim(Str* str) {
(str->begin)++;
if (str->begin == str->end) return;
str->end--;
/*while (isspace((unsigned char)*str->end) && str->end >= str->begin)
str->end--;*/
while (((unsigned char)*str->end == '\r') && str->end >= str->begin)
str->end--;
str->end++;
}

View File

@ -249,9 +249,9 @@ void Atlas::trim(Str *str) {
str->end--;
/*while (isspace((unsigned char) *str->end) && str->end >= str->begin) {
while (((unsigned char)*str->end == '\r') && str->end >= str->begin) {
str->end--;
}*/
}
str->end++;
}