From c657f1d09a1a9c2e8bcb60e21254706d540e6d1c Mon Sep 17 00:00:00 2001 From: Max Horn Date: Fri, 29 Aug 2008 09:44:05 +0000 Subject: Made out-of-memory error in SCUMM a bit more verbose svn-id: r34201 --- engines/scumm/dialogs.cpp | 3 +-- engines/scumm/resource.cpp | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) (limited to 'engines') diff --git a/engines/scumm/dialogs.cpp b/engines/scumm/dialogs.cpp index f9a8647d0d..7f87a9e623 100644 --- a/engines/scumm/dialogs.cpp +++ b/engines/scumm/dialogs.cpp @@ -395,8 +395,7 @@ void SaveLoadChooser::updateInfos(bool redraw) { int hours = minutes / 60; minutes %= 60; - snprintf(buffer, 32, "Playtime: %.2d:%.2d", - hours & 0xFF, minutes & 0xFF); + snprintf(buffer, 32, "Playtime: %.2d:%.2d", hours, minutes); _playtime->setLabel(buffer); } else { _date->setLabel("No date saved"); diff --git a/engines/scumm/resource.cpp b/engines/scumm/resource.cpp index 6bd62c1761..c543174852 100644 --- a/engines/scumm/resource.cpp +++ b/engines/scumm/resource.cpp @@ -809,7 +809,7 @@ byte *ResourceManager::createResource(int type, int idx, uint32 size) { ptr = (byte *)calloc(size + sizeof(MemBlkHeader) + SAFETY_AREA, 1); if (ptr == NULL) { - error("Out of memory while allocating %d", size); + error("createResource(%s,%d): Out of memory while allocating %d", resTypeFromId(type), idx, size); } _allocatedSize += size; -- cgit v1.2.3