X-Git-Url: https://git.saurik.com/redis.git/blobdiff_plain/3fa19b7dfc785aeaa8c1d32782b0b0018a965d13..18aa2b87b6db7fa79b0596590aa385adcbc64e53:/src/ziplist.c?ds=sidebyside diff --git a/src/ziplist.c b/src/ziplist.c index 95103dc0..113e71d9 100644 --- a/src/ziplist.c +++ b/src/ziplist.c @@ -304,7 +304,7 @@ static int64_t zipLoadInteger(unsigned char *p, unsigned char encoding) { ret = i16; } else if (encoding == ZIP_INT_32B) { memcpy(&i32,p,sizeof(i32)); - memrev16ifbe(&i32); + memrev32ifbe(&i32); ret = i32; } else if (encoding == ZIP_INT_64B) { memcpy(&i64,p,sizeof(i64)); @@ -465,7 +465,7 @@ static unsigned char *__ziplistDelete(unsigned char *zl, unsigned char *p, unsig * size of prevlen doesn't have an effect on the *tail* offset. */ tail = zipEntry(p); if (p[tail.headersize+tail.len] != ZIP_END) { - ZIPLIST_TAIL_OFFSET(zl) += + ZIPLIST_TAIL_OFFSET(zl) = intrev32ifbe(intrev32ifbe(ZIPLIST_TAIL_OFFSET(zl))+nextdiff); }