aboutsummaryrefslogtreecommitdiff
path: root/engines/sword2/resman.h
diff options
context:
space:
mode:
authorTorbjörn Andersson2006-07-08 20:45:01 +0000
committerTorbjörn Andersson2006-07-08 20:45:01 +0000
commit7bfaa0db78b79c555fc1137de4a5964beca9d16e (patch)
tree5c9079aa73c7653b4055a807870f81c9694550bf /engines/sword2/resman.h
parent8edc7ce1f74232be366957553cbf224f462576b4 (diff)
downloadscummvm-rg350-7bfaa0db78b79c555fc1137de4a5964beca9d16e.tar.gz
scummvm-rg350-7bfaa0db78b79c555fc1137de4a5964beca9d16e.tar.bz2
scummvm-rg350-7bfaa0db78b79c555fc1137de4a5964beca9d16e.zip
Cleanup
svn-id: r23439
Diffstat (limited to 'engines/sword2/resman.h')
-rw-r--r--engines/sword2/resman.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/engines/sword2/resman.h b/engines/sword2/resman.h
index 58875f1a74..756611ea31 100644
--- a/engines/sword2/resman.h
+++ b/engines/sword2/resman.h
@@ -98,7 +98,12 @@ public:
return ptr[0];
}
- byte *fetchName(uint32 res, byte *buf) {
+ byte *fetchName(uint32 res, byte *buf = NULL) {
+ static byte tempbuf[NAME_LEN];
+
+ if (!buf)
+ buf = tempbuf;
+
byte *ptr = openResource(res);
memcpy(buf, ptr + 10, NAME_LEN);
closeResource(res);