aboutsummaryrefslogtreecommitdiff
path: root/sword2
diff options
context:
space:
mode:
authorTorbjörn Andersson2004-09-07 17:52:03 +0000
committerTorbjörn Andersson2004-09-07 17:52:03 +0000
commit933cbeb91e0489cc4f23f2b8812e927ff7ec9143 (patch)
tree72b2dc55abae8eb6efef376fded1e31407ae2fa7 /sword2
parent93ae8343333f91bae55c1f588cf9ac64d72e056e (diff)
downloadscummvm-rg350-933cbeb91e0489cc4f23f2b8812e927ff7ec9143.tar.gz
scummvm-rg350-933cbeb91e0489cc4f23f2b8812e927ff7ec9143.tar.bz2
scummvm-rg350-933cbeb91e0489cc4f23f2b8812e927ff7ec9143.zip
Fixed debug output.
svn-id: r14951
Diffstat (limited to 'sword2')
-rw-r--r--sword2/memory.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/sword2/memory.cpp b/sword2/memory.cpp
index 6d348cfd29..a76a57e682 100644
--- a/sword2/memory.cpp
+++ b/sword2/memory.cpp
@@ -244,8 +244,9 @@ void MemoryManager::memFree(byte *ptr) {
}
void MemoryManager::memDisplay() {
- for (int i = 0; i < _numBlocks; i++)
- Debug_Printf("%d: %ld bytes allocated by resource %d\n", i, _memBlocks[i].size, _memBlocks[i].uid);
+ for (int i = 0; i < MAX_BLOCKS; i++)
+ if (_memBlocks[i].ptr)
+ Debug_Printf("%d: %ld bytes allocated by resource %d\n", i, _memBlocks[i].size, _memBlocks[i].uid);
}
void MemoryManager::memStatusStr(char *buf) {