Fix crash on spacebar

main
Cameron Murphy Reikes 2 years ago
parent bb849cd026
commit 4ed024a025

@ -927,7 +927,7 @@ void event(const sapp_event* e)
} }
int key_num = e->key_code - SAPP_KEYCODE_0; int key_num = e->key_code - SAPP_KEYCODE_0;
int target_box = key_num - 1; int target_box = key_num - 1;
if (target_box < BoxLast) { if (target_box < BoxLast && target_box >= 0) {
attempt_to_build(target_box); attempt_to_build(target_box);
} }

Loading…
Cancel
Save