[Scummvm-git-logs] scummvm master -> bf19a225484d2881260c7fe1cb2975a305d4e749

bluegr noreply at scummvm.org
Sun Sep 15 08:30:53 UTC 2024


This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
bf19a22548 NEVERHOOD: Support DCL entry with bogus size


Commit: bf19a225484d2881260c7fe1cb2975a305d4e749
    https://github.com/scummvm/scummvm/commit/bf19a225484d2881260c7fe1cb2975a305d4e749
Author: Vladimir Serbinenko (phcoder at gmail.com)
Date: 2024-09-15T11:30:51+03:00

Commit Message:
NEVERHOOD: Support DCL entry with bogus size

This fixes crash with Fargus translation of Neverhood

Signed-off-by: Vladimir Serbinenko <phcoder at gmail.com>

Changed paths:
    engines/neverhood/blbarchive.cpp


diff --git a/engines/neverhood/blbarchive.cpp b/engines/neverhood/blbarchive.cpp
index b7f867980cd..0260300eada 100644
--- a/engines/neverhood/blbarchive.cpp
+++ b/engines/neverhood/blbarchive.cpp
@@ -111,11 +111,13 @@ void BlbArchive::load(BlbArchiveEntry *entry, byte *buffer, uint32 size) {
 			size = entry->diskSize;
 		_fd.read(buffer, size);
 		break;
-	case 3: // DCL-compressed
+	case 3: {// DCL-compressed
+		memset(buffer, 0, size);
 		if (!Common::decompressDCL(&_fd, buffer, entry->diskSize, entry->size))
-			error("BlbArchive::load() Error during decompression of %08X (offset: %d, disk size: %d, size: %d)",
+			warning("BlbArchive::load() Error during decompression of %08X (offset: %d, disk size: %d, size: %d)",
 					entry->fileHash, entry->offset, entry->diskSize, entry->size);
 		break;
+	}
 	default:
 		error("BlbArchive::load() Unknown compression type %d", entry->comprType);
 	}




More information about the Scummvm-git-logs mailing list