diff options
-rw-r--r-- | common/rfb/Congestion.cxx | 2 |
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"); |