X-Git-Url: https://git.artsoft.org/?a=blobdiff_plain;f=src%2Ftools.c;h=247bcffd33d5a9de7d3a2afb9fce86270feabea0;hb=2d33cabb4017e5e4c2c4678db762b41d5ca9ea85;hp=3af2b5f9220a853757939b8c7664fea97427eeb8;hpb=db6f077754043bf94cf6a18ced0c0191744a1487;p=rocksndiamonds.git diff --git a/src/tools.c b/src/tools.c index 3af2b5f9..247bcffd 100644 --- a/src/tools.c +++ b/src/tools.c @@ -4184,6 +4184,8 @@ unsigned int MoveDoor(unsigned int door_state) } } + max_step_delay = MAX(1, max_step_delay); // prevent division by zero + num_move_steps = max_move_delay / max_step_delay; num_move_steps_doors_only = max_move_delay_doors_only / max_step_delay;