From 54608e4a7609e6fb1252bf81e364a51cf4218541 Mon Sep 17 00:00:00 2001 From: James Churchill Date: Fri, 25 Mar 2016 19:39:48 +1000 Subject: [PATCH] Fix incorrect ROM size check LoROMs have 32k (0x8000) banks, but the check required at least 64k. --- main.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/main.c b/main.c index d1dcaa4..29312d8 100644 --- a/main.c +++ b/main.c @@ -286,10 +286,9 @@ int main(int argc, char *argv[]) // Make sure the image is big enough - if (len < 0x10000 || (skip == 1 && len < 0x10200)) + if (len < 0x8000 || (skip == 1 && len < 0x8200)) { - printf("This file looks too small to be a rom image.\n"); - exit(1); + printf("This file looks too small to be a legitimate rom image.\n"); } // Allocate mem for file. Extra 3 bytes to prevent segfault during memcpy