[Scummvm-cvs-logs] CVS: scummvm-new/scumm/smush chunk.cpp,1.2,1.3 chunk.h,1.2,1.3

Ruediger Hanke tomjoad at users.sourceforge.net
Sun Aug 25 15:24:02 CEST 2002


Update of /cvsroot/scummvm/scummvm-new/scumm/smush
In directory usw-pr-cvs1:/tmp/cvs-serv10860

Modified Files:
	chunk.cpp chunk.h 
Log Message:
Yet another char issue, caused balance out of range error

Index: chunk.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm-new/scumm/smush/chunk.cpp,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- chunk.cpp	25 Aug 2002 17:36:33 -0000	1.2
+++ chunk.cpp	25 Aug 2002 22:23:47 -0000	1.3
@@ -157,10 +157,10 @@
 	return true;
 }
 
-char FileChunk::getChar() {
+int8 FileChunk::getChar() {
 	if(_curPos >= _size) error("invalid char read request");
 	_data->seek(_offset + _curPos);
-	char buffer;
+	int8 buffer;
 	_data->read(&buffer, sizeof(buffer));
 	_curPos+= sizeof(buffer);
 	return buffer;
@@ -255,7 +255,7 @@
 	return true;
 }
 
-char ContChunk::getChar() {
+int8 ContChunk::getChar() {
 	if(_curPos >= _size) error("invalid char read request");
 	return _data[_curPos++];
 }

Index: chunk.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm-new/scumm/smush/chunk.h,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- chunk.h	24 Aug 2002 23:21:55 -0000	1.2
+++ chunk.h	25 Aug 2002 22:23:47 -0000	1.3
@@ -52,7 +52,7 @@
 	virtual unsigned int tell() const = 0;	//!< get the Chunk current read position
 	virtual bool seek(int delta, seek_type dir = seek_cur) = 0;	//!< move the current read position inside the Chunk
 	virtual bool read(void * buffer, unsigned int size) = 0;		//!< read some data for the current read position
-	virtual char getChar() = 0;							//!< extract the character at the current read position
+	virtual int8 getChar() = 0;							//!< extract the character at the current read position
 	virtual unsigned char getByte() = 0;					//!< extract the byte at the current read position
 	virtual short getShort() = 0;						//!< extract the short at the current read position
 	virtual unsigned short getWord() = 0;					//!< extract the word at the current read position
@@ -85,7 +85,7 @@
 	unsigned int tell() const;
 	bool seek(int delta, seek_type dir = seek_cur);
 	bool read(void * buffer, unsigned int size);
-	char getChar();
+	int8 getChar();
 	unsigned char getByte();
 	short getShort();
 	unsigned short getWord();
@@ -111,7 +111,7 @@
 	unsigned int tell() const;
 	bool seek(int delta, seek_type dir = seek_cur);
 	bool read(void * buffer, unsigned int size);
-	char getChar();
+	int8 getChar();
 	unsigned char getByte();
 	short getShort();
 	unsigned short getWord();





More information about the Scummvm-git-logs mailing list