diff --git a/src/openrct2/peep/staff.c b/src/openrct2/peep/staff.c index 6725f712e4..d197541e21 100644 --- a/src/openrct2/peep/staff.c +++ b/src/openrct2/peep/staff.c @@ -406,7 +406,7 @@ void game_command_set_staff_order(sint32 *eax, sint32 *ebx, sint32 *ecx, sint32 if(order_id & 0x80){ // change costume uint8 sprite_type = order_id & ~0x80; sprite_type += 4; - if (sprite_type > countof(peep_slow_walking_types)) { + if (sprite_type >= countof(peep_slow_walking_types)) { log_error("Invalid change costume order for sprite_type %u", sprite_type); *ebx = MONEY32_UNDEFINED; return;