[Scummvm-git-logs] scummvm master -> 4b0c96f708c00ead30fe69c9baa4a0e999c0bce7

sdelamarre noreply at scummvm.org
Sat Aug 23 09:17:36 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:
4b0c96f708 GOB: Fix an edge case in adjustHotspotTextRect() (TTS)


Commit: 4b0c96f708c00ead30fe69c9baa4a0e999c0bce7
    https://github.com/scummvm/scummvm/commit/4b0c96f708c00ead30fe69c9baa4a0e999c0bce7
Author: Simon Delamarre (simon.delamarre14 at gmail.com)
Date: 2025-08-23T11:16:33+02:00

Commit Message:
GOB: Fix an edge case in adjustHotspotTextRect() (TTS)

Fix a failing assert(isValidRect()).

We must stick to int16 here in order to properly rule out invalid rectangles,
as the calling opcode, o1_copy_sprite(), is sometimes called with negative
coordinates.

Changed paths:
    engines/gob/hotspots.cpp
    engines/gob/hotspots.h


diff --git a/engines/gob/hotspots.cpp b/engines/gob/hotspots.cpp
index 52d49f4eee4..154401190f7 100644
--- a/engines/gob/hotspots.cpp
+++ b/engines/gob/hotspots.cpp
@@ -2004,7 +2004,7 @@ void Hotspots::clearPreviousSaid() {
 	_previousSaid.clear();
 }
 
-void Hotspots::adjustHotspotTextRect(uint16 oldLeft, uint16 oldTop, uint16 oldRight, uint16 oldBottom, uint16 newX, uint16 newY, int16 surf) {
+void Hotspots::adjustHotspotTextRect(int16 oldLeft, int16 oldTop, int16 oldRight, int16 oldBottom, int16 newX, int16 newY, int16 surf) {
 	if (oldLeft > oldRight || oldTop > oldBottom) {
 		return;
 	}
diff --git a/engines/gob/hotspots.h b/engines/gob/hotspots.h
index d49cc1ff88c..f0c27390d50 100644
--- a/engines/gob/hotspots.h
+++ b/engines/gob/hotspots.h
@@ -114,7 +114,7 @@ public:
 	void clearHotspotText();
 	void clearUnassignedHotspotText();
 	void clearPreviousSaid();
-	void adjustHotspotTextRect(uint16 oldLeft, uint16 oldTop, uint16 oldRight, uint16 oldBottom, uint16 newX, uint16 newY, int16 surf);
+	void adjustHotspotTextRect(int16 oldLeft, int16 oldTop, int16 oldRight, int16 oldBottom, int16 newX, int16 newY, int16 surf);
 #endif
 
 private:




More information about the Scummvm-git-logs mailing list