aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--engines/sci/gfx/gfx_widgets.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/engines/sci/gfx/gfx_widgets.cpp b/engines/sci/gfx/gfx_widgets.cpp
index 3aacd8f42c..8f25abd3dd 100644
--- a/engines/sci/gfx/gfx_widgets.cpp
+++ b/engines/sci/gfx/gfx_widgets.cpp
@@ -496,7 +496,10 @@ static int _gfxwop_primitive_equals(gfxw_widget_t *widget, gfxw_widget_t *other)
oprim = (gfxw_primitive_t *) other;
- if (!toCommonRect(wprim->bounds).equals(toCommonRect(oprim->bounds)))
+ // Check if the two primitives are equal (note: the primitives aren't always rectangles, so
+ // the "width" and the "height" here could be negative)
+ if (wprim->bounds.x != oprim->bounds.x || wprim->bounds.y != oprim->bounds.y ||
+ wprim->bounds.width != oprim->bounds.width || wprim->bounds.height != oprim->bounds.height)
return 0;
if (!_color_equals(wprim->color, oprim->color))