aboutsummaryrefslogtreecommitdiff
path: root/lib/lz4hc.c
diff options
context:
space:
mode:
authorW. Felix Handte <w@felixhandte.com>2018-04-19 19:36:34 -0400
committerW. Felix Handte <w@felixhandte.com>2018-04-19 20:54:35 -0400
commit14c577d4c9332197dc0003833e043608b4b4b239 (patch)
treefdcbc5048ea6f83ad00b83a87ed09b989b0d215e /lib/lz4hc.c
parentf4b13e17ea110498c41ba3ac8dc6df0438c37d29 (diff)
downloadlz4-14c577d4c9332197dc0003833e043608b4b4b239.tar.gz
Fix Signedness of Comparison
Diffstat (limited to 'lib/lz4hc.c')
-rw-r--r--lib/lz4hc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/lz4hc.c b/lib/lz4hc.c
index 9a02787e..20df8fa3 100644
--- a/lib/lz4hc.c
+++ b/lib/lz4hc.c
@@ -308,7 +308,7 @@ LZ4HC_InsertAndGetWiderMatch (
ptrdiff_t dictIndexDelta = dictCtx->base - dictCtx->end + lowLimit;
dictMatchIndex = dictCtx->hashTable[LZ4HC_hashPtr(ip)];
matchIndex = dictMatchIndex + (int)dictIndexDelta;
- while (dictMatchIndex + MAX_DISTANCE > ip - base - dictIndexDelta && nbAttempts--) {
+ while ((ptrdiff_t) dictMatchIndex + MAX_DISTANCE > ip - base - dictIndexDelta && nbAttempts--) {
const BYTE* const matchPtr = dictCtx->base + dictMatchIndex;
if (LZ4_read32(matchPtr) == pattern) {