[Scummvm-git-logs] scummvm master -> 6c7359c034809323b6bc56a21527d2313b24a1d2

antoniou79 noreply at scummvm.org
Sat Aug 23 20:46:43 UTC 2025


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:
6c7359c034 TSAGE: BLUEFORCE: Fix click on empty inv slot


Commit: 6c7359c034809323b6bc56a21527d2313b24a1d2
    https://github.com/scummvm/scummvm/commit/6c7359c034809323b6bc56a21527d2313b24a1d2
Author: antoniou79 (a.antoniou79 at gmail.com)
Date: 2025-08-23T23:46:28+03:00

Commit Message:
TSAGE: BLUEFORCE: Fix click on empty inv slot

This would lead to a segmentation fault for bad resource size for Blue Force

Changed paths:
    engines/tsage/blue_force/blueforce_logic.cpp


diff --git a/engines/tsage/blue_force/blueforce_logic.cpp b/engines/tsage/blue_force/blueforce_logic.cpp
index 99f731dbcb7..af41056ccd9 100644
--- a/engines/tsage/blue_force/blueforce_logic.cpp
+++ b/engines/tsage/blue_force/blueforce_logic.cpp
@@ -1350,7 +1350,12 @@ void BlueForceInvObjectList::alterInventory(int mode) {
  * When an inventory item is selected, check if it's the gun belt, since that has a specific dialog
  */
 bool BlueForceInvObjectList::SelectItem(int objectNumber) {
-	if (objectNumber == INV_AMMO_BELT) {
+	if (objectNumber == 0) {
+		// For Blue Force, clicking on an empty inventory (which corresponds to objectNumber 0)
+		// has to return true here to prevent the cursor being set (in UIInventorySlot::process())
+		// which would cause an assertion fault for resource size.
+		return true;
+	} else if (objectNumber == INV_AMMO_BELT) {
 		AmmoBeltDialog *dlg = new AmmoBeltDialog();
 		dlg->execute();
 		delete dlg;




More information about the Scummvm-git-logs mailing list