diff options
author | Ruediger Hanke | 2002-08-25 22:23:47 +0000 |
---|---|---|
committer | Ruediger Hanke | 2002-08-25 22:23:47 +0000 |
commit | b295fd0bbd6a7ca55625adbd4b755f9ab847faeb (patch) | |
tree | c1afebe8d7ce930f334bd895a7edf692696432b4 | |
parent | a605b453ce509f83e80129c80c18e97eca7fc023 (diff) | |
download | scummvm-rg350-b295fd0bbd6a7ca55625adbd4b755f9ab847faeb.tar.gz scummvm-rg350-b295fd0bbd6a7ca55625adbd4b755f9ab847faeb.tar.bz2 scummvm-rg350-b295fd0bbd6a7ca55625adbd4b755f9ab847faeb.zip |
Yet another char issue, caused balance out of range error
svn-id: r4859
-rw-r--r-- | scumm/smush/chunk.cpp | 6 | ||||
-rw-r--r-- | scumm/smush/chunk.h | 6 |
2 files changed, 6 insertions, 6 deletions
diff --git a/scumm/smush/chunk.cpp b/scumm/smush/chunk.cpp index 6e30541346..c620c9d5d4 100644 --- a/scumm/smush/chunk.cpp +++ b/scumm/smush/chunk.cpp @@ -157,10 +157,10 @@ bool FileChunk::read(void * buffer, unsigned int size) { 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 @@ bool ContChunk::read(void * buffer, unsigned int size) { return true; } -char ContChunk::getChar() { +int8 ContChunk::getChar() { if(_curPos >= _size) error("invalid char read request"); return _data[_curPos++]; } diff --git a/scumm/smush/chunk.h b/scumm/smush/chunk.h index 72c22229b1..84dba0ca10 100644 --- a/scumm/smush/chunk.h +++ b/scumm/smush/chunk.h @@ -52,7 +52,7 @@ public: 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 @@ public: 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 @@ public: 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(); |