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

Strangerke noreply at scummvm.org
Thu Feb 5 21:53:16 UTC 2026


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

Summary:
cda528630f M4: Fix regression in resources handing - Bug #16515


Commit: cda528630f73043e03aae6ba0811aca70844efcc
    https://github.com/scummvm/scummvm/commit/cda528630f73043e03aae6ba0811aca70844efcc
Author: Strangerke (arnaud.boutonne at gmail.com)
Date: 2026-02-05T22:52:57+01:00

Commit Message:
M4: Fix regression in resources handing - Bug #16515

Changed paths:
    engines/m4/mem/res.cpp


diff --git a/engines/m4/mem/res.cpp b/engines/m4/mem/res.cpp
index 39c5e6bfe41..0db741bbd33 100644
--- a/engines/m4/mem/res.cpp
+++ b/engines/m4/mem/res.cpp
@@ -56,15 +56,17 @@ Resources::Entry *Resources::findAndSetResEntry(const Common::String &resourceNa
 			// if we searched every entry to no avail:
 			if ((hash_val = (hash_val + 1) & (HASHSIZE - 1)) == orig_hash_val) {
 				hash_val = orig_hash_val;
-				while (!(_resources[hash_val].Flags & MARKED_PURGE))
+				while (!(_resources[hash_val].Flags & MARKED_PURGE)) {
 					// if we searched every entry to no avail:
 					if ((hash_val = (hash_val + 1) & (HASHSIZE - 1)) == orig_hash_val) {
 						error("Out of resource space");
 					}
+				}
 
 				res = &_resources[hash_val];
 				delete[] res->RHandle;
 				res->RHandle = nullptr;
+				break;
 			}
 		}
 	}




More information about the Scummvm-git-logs mailing list