diff options
author | W. Felix Handte <w@felixhandte.com> | 2018-04-19 23:36:34 (GMT) |
---|---|---|
committer | W. Felix Handte <w@felixhandte.com> | 2018-04-20 00:54:35 (GMT) |
commit | 14c577d4c9332197dc0003833e043608b4b4b239 (patch) | |
tree | fdcbc5048ea6f83ad00b83a87ed09b989b0d215e /lib/lz4hc.c | |
parent | f4b13e17ea110498c41ba3ac8dc6df0438c37d29 (diff) | |
download | lz4-14c577d4c9332197dc0003833e043608b4b4b239.zip lz4-14c577d4c9332197dc0003833e043608b4b4b239.tar.gz lz4-14c577d4c9332197dc0003833e043608b4b4b239.tar.bz2 |
Fix Signedness of Comparison
Diffstat (limited to 'lib/lz4hc.c')
-rw-r--r-- | lib/lz4hc.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/lz4hc.c b/lib/lz4hc.c index 9a02787..20df8fa 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) { |