Skip to content

Commit

Permalink
Add support for LF line endings to gbagfx
Browse files Browse the repository at this point in the history
  • Loading branch information
nashalexander authored and SBird1337 committed Jun 20, 2024
1 parent 366f8b3 commit c0d630e
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions tools/gbagfx/jasc_pal.c
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down

0 comments on commit c0d630e

Please sign in to comment.