diff options
Diffstat (limited to 'engines/sword2/resman.h')
-rw-r--r-- | engines/sword2/resman.h | 7 |
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); |