diff --git a/src/ziplist.c b/src/ziplist.c index 85cb50991..aae86c1f2 100644 --- a/src/ziplist.c +++ b/src/ziplist.c @@ -263,7 +263,7 @@ * to stay there to signal that a full scan is needed to get the number of * items inside the ziplist. */ #define ZIPLIST_INCR_LENGTH(zl,incr) { \ - if (ZIPLIST_LENGTH(zl) < UINT16_MAX) \ + if (intrev16ifbe(ZIPLIST_LENGTH(zl)) < UINT16_MAX) \ ZIPLIST_LENGTH(zl) = intrev16ifbe(intrev16ifbe(ZIPLIST_LENGTH(zl))+incr); \ }