mirror of
https://github.com/libretro/scummvm.git
synced 2024-12-15 06:08:35 +00:00
SAGA2: Fix for out-of-bounds intersect
This commit is contained in:
parent
13310e555e
commit
5a7eb68905
@ -86,10 +86,10 @@ Rect16 intersect(const Rect16 a, const Rect16 b) {
|
||||
y1 = MAX(a.y, b.y);
|
||||
height = MIN(a.y + a.height, b.y + b.height) - y1;
|
||||
|
||||
// if ( ( width <= 0 ) || ( height <= 0 ) )
|
||||
// return Rect16( 0, 0, 0, 0 );
|
||||
// else
|
||||
return Rect16(x1, y1, width, height);
|
||||
if ((width <= 0) || (height <= 0))
|
||||
return Rect16(0, 0, 0, 0);
|
||||
else
|
||||
return Rect16(x1, y1, width, height);
|
||||
}
|
||||
|
||||
void Rect16::normalize(void) {
|
||||
|
Loading…
Reference in New Issue
Block a user