ansilove

ANSI and ASCII art to PNG converter in C
Log | Files | Refs | README | LICENSE

commit cf38819ec203c715c5b8b3b67b305eb06f0d728b
parent 6ecd43bcd2c67ef7014bdef1014295ffbfbf4c8f
Author: Frederic Cambus <fcambus@users.sourceforge.net>
Date:   Sat,  2 Jan 2016 18:29:42 +0100

Using strncmp instead of strcmp + strndup combo, as strndup is not part of C99

Diffstat:
Msrc/ansilove.c | 2+-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/ansilove.c b/src/ansilove.c @@ -1893,7 +1893,7 @@ void alXbinLoader(char *input, char *output, char *retinaout, bool createRetinaR rewind(input_file); fclose(input_file); - if (strcmp(strndup((char *)input_file_buffer, 5), "XBIN\x1a") != 0) { + if (strncmp((char *)input_file_buffer, "XBIN\x1a", 5) != 0) { fputs("\nNot an XBin.\n\n", stderr); exit (4); }