[Scummvm-cvs-logs] CVS: tools extract_mm_nes.c,1.15,1.16
Eugene Sandulenko
sev at users.sourceforge.net
Fri Sep 23 05:03:05 CEST 2005
Update of /cvsroot/scummvm/tools
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28121
Modified Files:
extract_mm_nes.c
Log Message:
Add proper error message if ROM file is given to extraction tool.
Index: extract_mm_nes.c
===================================================================
RCS file: /cvsroot/scummvm/tools/extract_mm_nes.c,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -d -r1.15 -r1.16
--- extract_mm_nes.c 23 Sep 2005 10:48:31 -0000 1.15
+++ extract_mm_nes.c 23 Sep 2005 12:01:51 -0000 1.16
@@ -807,6 +807,14 @@
for (i = 0; i < 262144; i++)
CRC = (CRC >> 8) ^ CRCtable[(CRC ^ readByte(file)) & 0xFF];
+
+ readByte(file);
+ if (!feof(file)) {
+ printf("Apparently you're feeding me with full ROM and not just PRG section.\n"
+ "See ScummVM README section 3.8.\n");
+ exit(1);
+ }
+
return CRC ^ 0xFFFFFFFF;
}
More information about the Scummvm-git-logs
mailing list