This is an automated email from the git hooks/post-receive script.

smcv pushed a commit to annotated tag 1.42d
in repository iortcw.

commit 349454d10b97307ce3e7fd5ea3bd15c6f87e1b4e
Author: m4n4t4...@gmail.com 
<m4n4t4...@gmail.com@e65d2741-a53d-b2dc-ae96-bb75fa5e4c4a>
Date:   Mon Dec 29 20:43:39 2014 +0000

    All: Fix case where interval overflows
---
 MP/code/server/sv_main.c | 2 +-
 SP/code/server/sv_main.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/MP/code/server/sv_main.c b/MP/code/server/sv_main.c
index 373ba46..0181944 100644
--- a/MP/code/server/sv_main.c
+++ b/MP/code/server/sv_main.c
@@ -583,7 +583,7 @@ qboolean SVC_RateLimit( leakyBucket_t *bucket, int burst, 
int period ) {
                int expired = interval / period;
                int expiredRemainder = interval % period;
 
-               if ( expired > bucket->burst ) {
+               if ( expired > bucket->burst || interval < 0 ) {
                        bucket->burst = 0;
                        bucket->lastTime = now;
                } else {
diff --git a/SP/code/server/sv_main.c b/SP/code/server/sv_main.c
index 5cd3cea..9ff522d 100644
--- a/SP/code/server/sv_main.c
+++ b/SP/code/server/sv_main.c
@@ -501,7 +501,7 @@ qboolean SVC_RateLimit( leakyBucket_t *bucket, int burst, 
int period ) {
                int expired = interval / period;
                int expiredRemainder = interval % period;
 
-               if ( expired > bucket->burst ) {
+               if ( expired > bucket->burst || interval < 0 ) {
                        bucket->burst = 0;
                        bucket->lastTime = now;
                } else {

-- 
Alioth's /usr/local/bin/git-commit-notice on 
/srv/git.debian.org/git/pkg-games/iortcw.git

_______________________________________________
Pkg-games-commits mailing list
Pkg-games-commits@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-games-commits

Reply via email to