From 84dc29b929ca9b32c5898bf58ea7e70e4651952e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Janiszewski?= Date: Sun, 11 Sep 2016 21:19:16 +0200 Subject: [PATCH] Make sure shifted value is unsigned --- src/peep/staff.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/peep/staff.c b/src/peep/staff.c index 8089a10eda..61a31ac64c 100644 --- a/src/peep/staff.c +++ b/src/peep/staff.c @@ -610,7 +610,7 @@ bool staff_is_patrol_area_set(int staffIndex, int x, int y) int peepOffset = staffIndex * 128; int offset = (x | y) >> 5; int bitIndex = (x | y) & 0x1F; - return gStaffPatrolAreas[peepOffset + offset] & (1 << bitIndex); + return gStaffPatrolAreas[peepOffset + offset] & (((uint32)1) << bitIndex); } void staff_set_patrol_area(int staffIndex, int x, int y, bool value)