diff --git a/src/ziplist.c b/src/ziplist.c index fa73cbf6f..36556050c 100644 --- a/src/ziplist.c +++ b/src/ziplist.c @@ -255,7 +255,7 @@ /* Return the pointer to the last byte of a ziplist, which is, the * end of ziplist FF entry. */ -#define ZIPLIST_ENTRY_END(zl) ((zl)+intrev32ifbe(ZIPLIST_BYTES(zl))-1) +#define ZIPLIST_ENTRY_END(zl) ((zl)+intrev32ifbe(ZIPLIST_BYTES(zl))-ZIPLIST_END_SIZE) /* Increment the number of items field in the ziplist header. Note that this * macro should never overflow the unsigned 16 bit integer, since entries are