[Scummvm-cvs-logs] SF.net SVN: scummvm:[45305] tools/trunk/extract_loom_tg16.cpp
Kirben at users.sourceforge.net
Kirben at users.sourceforge.net
Wed Oct 21 15:14:53 CEST 2009
Revision: 45305
http://scummvm.svn.sourceforge.net/scummvm/?rev=45305&view=rev
Author: Kirben
Date: 2009-10-21 13:14:53 +0000 (Wed, 21 Oct 2009)
Log Message:
-----------
Fix overflow, causing incorrect room sizes.
Modified Paths:
--------------
tools/trunk/extract_loom_tg16.cpp
Modified: tools/trunk/extract_loom_tg16.cpp
===================================================================
--- tools/trunk/extract_loom_tg16.cpp 2009-10-21 12:59:10 UTC (rev 45304)
+++ tools/trunk/extract_loom_tg16.cpp 2009-10-21 13:14:53 UTC (rev 45305)
@@ -27,24 +27,24 @@
/* if not defined, dumps all resources to separate files */
#define MAKE_LFLS
-uint8 read_cbyte (FILE *input, short *ctr) {
+uint8 read_cbyte (FILE *input, uint32 *ctr) {
(*ctr) += 1;
return readByte(input);
}
-uint16 read_cword (FILE *input, short *ctr) {
+uint16 read_cword (FILE *input, uint32 *ctr) {
(*ctr) += 2;
return readUint16LE(input);
}
-void write_cbyte (FILE *output, uint8 val, short *ctr) {
+void write_cbyte (FILE *output, uint8 val, uint32 *ctr) {
writeByte(output, val);
(*ctr) += 1;
}
-void write_cword (FILE *output, uint16 val, short *ctr) {
+void write_cword (FILE *output, uint16 val, uint32 *ctr) {
writeUint16LE(output, val);
(*ctr) += 2;
}
-void write_clong (FILE *output, uint32 val, short *ctr) {
+void write_clong (FILE *output, uint32 val, uint32 *ctr) {
writeUint32LE(output, val);
(*ctr) += 4;
}
@@ -683,7 +683,7 @@
uint32 r_offset (p_resource res) {
return res->offset[ISO];
}
-signed short r_length (p_resource res) {
+uint16 r_length (p_resource res) {
return res->length[ISO];
}
@@ -691,7 +691,7 @@
#ifdef MAKE_LFLS
uint16 j, off;
#endif
- signed short i, rlen;
+ uint32 i, rlen;
uint8 junk, rtype, rid;
if (res == NULL)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Scummvm-git-logs
mailing list