Add support for LF line endings to gbagfx

This commit is contained in:
Alex Nash 2024-06-17 22:45:10 -04:00 committed by Philipp AUER
parent 366f8b33a3
commit c0d630ee63
1 changed files with 6 additions and 2 deletions

View File

@ -46,10 +46,14 @@ void ReadJascPaletteLine(FILE *fp, char *line)
}
if (c == '\n')
FATAL_ERROR("LF line endings aren't supported.\n");
{
line[length] = 0;
return;
}
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)
FATAL_ERROR("NUL character in file.\n");