From dd6723ffc2a61d60d307e644dd3d9f0623dc0aae Mon Sep 17 00:00:00 2001 From: onpon4 Date: Tue, 14 Apr 2015 17:15:06 -0400 Subject: [PATCH] Fixed division by 0 error --- src/game.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/game.cpp b/src/game.cpp index 386c721..2e2557f 100644 --- a/src/game.cpp +++ b/src/game.cpp @@ -138,7 +138,7 @@ static void game_addDebris(int x, int y, int amount) object *debris; - amount = RANDRANGE(3, rand() % amount); + amount = RANDRANGE(3, amount); LIMIT(amount, 3, 8); for (int i = 0 ; i < amount ; i++)