From 7bfaa0db78b79c555fc1137de4a5964beca9d16e Mon Sep 17 00:00:00 2001 From: Torbjörn Andersson Date: Sat, 8 Jul 2006 20:45:01 +0000 Subject: Cleanup svn-id: r23439 --- engines/sword2/resman.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'engines/sword2/resman.h') 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); -- cgit v1.2.3