diff options
author | Paweł Kołodziejski | 2003-09-13 18:36:16 +0000 |
---|---|---|
committer | Paweł Kołodziejski | 2003-09-13 18:36:16 +0000 |
commit | 971fff61b88bbb49f9349f8e237a7c30df9a05e1 (patch) | |
tree | 161fc6923c90c0bc717406046038ad52f6022bb4 /scumm | |
parent | 2afc2c0ca98ab759e5d39a620abd1002fe1c4d0b (diff) | |
download | scummvm-rg350-971fff61b88bbb49f9349f8e237a7c30df9a05e1.tar.gz scummvm-rg350-971fff61b88bbb49f9349f8e237a7c30df9a05e1.tar.bz2 scummvm-rg350-971fff61b88bbb49f9349f8e237a7c30df9a05e1.zip |
fixed size logic in readFileToArray()
svn-id: r10238
Diffstat (limited to 'scumm')
-rw-r--r-- | scumm/script_v6.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/scumm/script_v6.cpp b/scumm/script_v6.cpp index 467627433d..7d97d66da2 100644 --- a/scumm/script_v6.cpp +++ b/scumm/script_v6.cpp @@ -2371,7 +2371,7 @@ void Scumm_v6::o6_setBlastObjectWindow() { b = pop(); a = pop(); - warning("o6_setBlastObjectWindow(%d, %d, %d, %d)", a, b, c, d); + warning("o6_bompWindow(%d, %d, %d, %d)", a, b, c, d); // sub_274EF(a, b, c, d); } @@ -2885,11 +2885,12 @@ void Scumm_v6::o6_deleteFile() { } int Scumm_v6::readFileToArray(int slot, int32 size) { - int rest = _hFileTable[slot].size() - _hFileTable[slot].pos(); + if (size == 0) + size = _hFileTable[slot].size() - _hFileTable[slot].pos(); writeVar(0, 0); - defineArray(0, 3, 0, rest); + defineArray(0, 3, 0, size); byte *ptr = getResourceAddress(rtString, readVar(0)); - _hFileTable[slot].read(ptr, rest); + _hFileTable[slot].read(ptr, size); return readVar(0); } |