gbaconv

A set of tools aimed at GameBoy Advance developers
Log | Files | Refs | README | LICENSE

commit bcef1aa3d9b5c77273851f3be24851322b377e1c
parent 1175becb0c18a5566ffa6c08e2a3c8b6f4c058be
Author: Frederic Cambus <fred@statdns.com>
Date:   Fri, 22 Feb 2019 09:55:05 +0100

Take PCX_PALETTE_LENGTH into account when checking minimal possible file size.

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

diff --git a/pcx2gba.c b/pcx2gba.c @@ -85,7 +85,7 @@ int main(int argc, char *argv[]) { fread(input_file_buffer, input_file_size, 1, input_file); fclose(input_file); - if (input_file_size < PCX_HEADER_LENGTH) { + if (input_file_size < PCX_HEADER_LENGTH + PCX_PALETTE_LENGTH) { printf("ERROR: Input File is not a PCX file\n\n"); return -1; }