Add support for LF line endings to gbagfx
This commit is contained in:
@@ -46,10 +46,14 @@ void ReadJascPaletteLine(FILE *fp, char *line)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (c == '\n')
|
if (c == '\n')
|
||||||
FATAL_ERROR("LF line endings aren't supported.\n");
|
{
|
||||||
|
line[length] = 0;
|
||||||
|
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (c == EOF)
|
if (c == EOF)
|
||||||
FATAL_ERROR("Unexpected EOF. No CRLF at end of file.\n");
|
FATAL_ERROR("Unexpected EOF. No LF or CRLF at end of file.\n");
|
||||||
|
|
||||||
if (c == 0)
|
if (c == 0)
|
||||||
FATAL_ERROR("NUL character in file.\n");
|
FATAL_ERROR("NUL character in file.\n");
|
||||||
|
|||||||
Reference in New Issue
Block a user