aboutsummaryrefslogtreecommitdiff
path: root/engines/groovie
diff options
context:
space:
mode:
authorMatthew Hoops2011-06-02 15:25:03 -0400
committerMatthew Hoops2011-06-02 15:42:17 -0400
commit3a506073c33db6743c63023424d0638088a9fab5 (patch)
treeaa248bae5a7dc9190151f71a5d62c5bf89f50e7e /engines/groovie
parent305c6b4d8372178fc2dcd6e55a49ef3774766cf6 (diff)
downloadscummvm-rg350-3a506073c33db6743c63023424d0638088a9fab5.tar.gz
scummvm-rg350-3a506073c33db6743c63023424d0638088a9fab5.tar.bz2
scummvm-rg350-3a506073c33db6743c63023424d0638088a9fab5.zip
GROOVIE: Ensure the final character of the resource name is a null
Some filenames are exactly 12 bytes long ie. keyboard.vdx
Diffstat (limited to 'engines/groovie')
-rw-r--r--engines/groovie/resource.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/engines/groovie/resource.cpp b/engines/groovie/resource.cpp
index 10cf24a589..05b43b7d3c 100644
--- a/engines/groovie/resource.cpp
+++ b/engines/groovie/resource.cpp
@@ -170,8 +170,9 @@ bool ResMan_t7g::getResInfo(uint32 fileRef, ResInfo &resInfo) {
}
// Read the resource name (just for debugging purposes)
- char resname[12];
+ char resname[13];
rlFile->read(resname, 12);
+ resname[12] = 0;
debugC(2, kGroovieDebugResource | kGroovieDebugAll, "Groovie::Resource: Resource name: %12s", resname);
resInfo.filename = resname;