aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--scumm/resource.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/scumm/resource.cpp b/scumm/resource.cpp
index 01dce3cd75..532ea21a87 100644
--- a/scumm/resource.cpp
+++ b/scumm/resource.cpp
@@ -484,13 +484,11 @@ void ScummEngine::readIndexBlock(uint32 blocktype, uint32 itemsize) {
// Names of rooms. Maybe we should put them into a table, for use by the debugger?
if (_heversion >= 80) {
for (int room; (room = _fileHandle->readUint16LE()); ) {
- char buf[30];
+ char buf[100];
i = 0;
- for (byte s; (s = _fileHandle->readByte()); ) {
- assert(i < ARRAYSIZE(buf));
+ for (byte s; (s = _fileHandle->readByte()) && i < ARRAYSIZE(buf) - 1; ) {
buf[i++] = s;
}
- assert(i < ARRAYSIZE(buf));
buf[i] = 0;
debug(5, "Room %d: '%s'", room, buf);
}