diff options
Diffstat (limited to 'engines')
-rw-r--r-- | engines/groovie/resource.cpp | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/engines/groovie/resource.cpp b/engines/groovie/resource.cpp index 05b43b7d3c..c26f04d6ee 100644 --- a/engines/groovie/resource.cpp +++ b/engines/groovie/resource.cpp @@ -169,7 +169,7 @@ bool ResMan_t7g::getResInfo(uint32 fileRef, ResInfo &resInfo) { error("Groovie::Resource: Invalid resource number: 0x%04X (%s)", resNum, rlFileName.c_str()); } - // Read the resource name (just for debugging purposes) + // Read the resource name char resname[13]; rlFile->read(resname, 12); resname[12] = 0; @@ -240,7 +240,7 @@ uint32 ResMan_v2::getRef(Common::String name, Common::String scriptname) { // Test whether it's the resource we're searching Common::String resname(readname, 18); if (resname.hasPrefix(name.c_str())) { - debugC(2, kGroovieDebugResource | kGroovieDebugAll, "Groovie::Resource: Resource %12s matches %s", readname, name.c_str()); + debugC(2, kGroovieDebugResource | kGroovieDebugAll, "Groovie::Resource: Resource %18s matches %s", readname, name.c_str()); found = true; } } @@ -279,10 +279,11 @@ bool ResMan_v2::getResInfo(uint32 fileRef, ResInfo &resInfo) { resInfo.size = rlFile.readUint32LE(); resInfo.gjd = rlFile.readUint16LE(); - // Read the resource name (just for debugging purposes) - char resname[12]; - rlFile.read(resname, 12); - debugC(2, kGroovieDebugResource | kGroovieDebugAll, "Groovie::Resource: Resource name: %12s", resname); + // Read the resource name + char resname[19]; + resname[18] = 0; + rlFile.read(resname, 18); + debugC(2, kGroovieDebugResource | kGroovieDebugAll, "Groovie::Resource: Resource name: %18s", resname); resInfo.filename = resname; // 6 padding bytes? (it looks like they're always 0) |