From: Holger Schemel Date: Mon, 18 May 2015 06:58:04 +0000 (+0200) Subject: fixed bug in counter wait function X-Git-Tag: 4.0.0.0-rc1~196 X-Git-Url: https://git.artsoft.org/?a=commitdiff_plain;h=5f189129bbc68852e3eb8b8d66c0b01b7f9da8fc;p=rocksndiamonds.git fixed bug in counter wait function --- diff --git a/src/libgame/misc.c b/src/libgame/misc.c index 6d80620b..cf387ceb 100644 --- a/src/libgame/misc.c +++ b/src/libgame/misc.c @@ -427,7 +427,9 @@ int WaitUntilDelayReached(unsigned int *counter_var, unsigned int delay) break; } - if (*counter_var != 0 && actual_counter >= *counter_var + delay) + if (*counter_var != 0 && + delay != 0 && + actual_counter >= *counter_var + delay) { int lag = actual_counter - (*counter_var + delay); int delay2 = (delay + 1) / 2;