[Scummvm-git-logs] scummvm master -> 0c3be802d828597c4149fe2e90a37f4c0be2a88f

criezy criezy at scummvm.org
Sun Apr 11 03:05:01 UTC 2021


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:
0c3be802d8 AGS: Fix logic to find available custom overlay ID


Commit: 0c3be802d828597c4149fe2e90a37f4c0be2a88f
    https://github.com/scummvm/scummvm/commit/0c3be802d828597c4149fe2e90a37f4c0be2a88f
Author: Thierry Crozat (criezy at scummvm.org)
Date: 2021-04-11T03:59:24+01:00

Commit Message:
AGS: Fix logic to find available custom overlay ID

The wrong logic meant that it could use OVER_CUSTOM when
it was meant to use at least OVER_CUSTOM + 1.
This fixes bug #12388.

Changed paths:
    engines/ags/engine/ac/overlay.cpp


diff --git a/engines/ags/engine/ac/overlay.cpp b/engines/ags/engine/ac/overlay.cpp
index 2af5973aac..268b593723 100644
--- a/engines/ags/engine/ac/overlay.cpp
+++ b/engines/ags/engine/ac/overlay.cpp
@@ -194,7 +194,7 @@ size_t add_screen_overlay(int x, int y, int type, Shared::Bitmap *piccy, int pic
 	if (type == OVER_TEXTMSG) _G(is_text_overlay)++;
 	if (type == OVER_CUSTOM) {
 		// find an unused custom ID; TODO: find a better approach!
-		for (int id = OVER_CUSTOM + 1; id < (int)_GP(screenover).size() + OVER_CUSTOM + 1; ++id) {
+		for (int id = OVER_CUSTOM + 1; id < OVER_CUSTOM + 100; ++id) {
 			if (find_overlay_of_type(id) == -1) {
 				type = id;
 				break;




More information about the Scummvm-git-logs mailing list