diff --git a/Makefile b/Makefile index 8fec75f..7e88eb9 100644 --- a/Makefile +++ b/Makefile @@ -12,7 +12,7 @@ DEPENDS:=$(OBJECTS:.o=.d) INCLUDE+=include INCLUDE:=$(INCLUDE:%=-I%) -COMMON+=-fsanitize=address +#COMMON+=-fsanitize=address CFLAGS+=$(COMMON) CFLAGS+=$(INCLUDE) diff --git a/src/engine.c b/src/engine.c index fd00e34..49f3f9c 100644 --- a/src/engine.c +++ b/src/engine.c @@ -228,7 +228,10 @@ static void signal_up() static void signal_harddrop() { while (field_move_shape_down(&fld, 1)); - transition_put_shape(); + if (field_shape_out_of_bounds(&fld, &fld.shape[1])) + transition_game_over(); + else + transition_put_shape(); sfClock_restart(game.gameTick); sfClock_restart(game.putTick); }