From 971fff61b88bbb49f9349f8e237a7c30df9a05e1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Ko=C5=82odziejski?= Date: Sat, 13 Sep 2003 18:36:16 +0000 Subject: [PATCH] fixed size logic in readFileToArray() svn-id: r10238 --- scumm/script_v6.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/scumm/script_v6.cpp b/scumm/script_v6.cpp index 467627433d6..7d97d66da2b 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); }