summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPierre Ossman <ossman@cendio.se>2019-05-09 15:55:53 +0200
committerPierre Ossman <ossman@cendio.se>2019-05-09 15:55:53 +0200
commitc65cd4b74677d7190dccf42fd252b947a9fb5170 (patch)
tree846b5e6eab2778f2872f8c8bdb830fb5d655ac03
parent2ff61a285efda80cca7f1855aca23b99149bac8c (diff)
parent95c46d8b7b03b1e0fce5169e78474cb2163ccde4 (diff)
downloadtigervnc-c65cd4b74677d7190dccf42fd252b947a9fb5170.tar.gz
tigervnc-c65cd4b74677d7190dccf42fd252b947a9fb5170.zip
Merge branch 'master' of https://github.com/lprylli/tigervnc
-rw-r--r--common/rfb/Congestion.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/common/rfb/Congestion.cxx b/common/rfb/Congestion.cxx
index 4a784522..f3f9ceea 100644
--- a/common/rfb/Congestion.cxx
+++ b/common/rfb/Congestion.cxx
@@ -70,7 +70,7 @@ static const unsigned MAXIMUM_WINDOW = 4194304;
// Compare position even when wrapped around
static inline bool isAfter(unsigned a, unsigned b) {
- return (int)a - (int)b > 0;
+ return a != b && a - b <= UINT_MAX / 2;
}
static LogWriter vlog("Congestion");