Reinitialize pointer 'p' after ziplistDeleteRange to fix head deletion bug (#537)
Fix https://github.com/valkey-io/valkey/actions/runs/9200055659/job/25305949916 Signed-off-by: Ping Xie <pingxie@google.com>
This commit is contained in:
parent
c41dd77a3e
commit
a0aebb6b67
@ -360,7 +360,7 @@ int test_ziplistDeleteInclusiveRange0To0(int argc, char **argv, int flags) {
|
||||
int orig_len = ziplistLen(zl);
|
||||
|
||||
zl = ziplistDeleteRange(zl, 0, 1);
|
||||
|
||||
p = ziplistIndex(zl, 0);
|
||||
TEST_ASSERT(ziplistCompare(p, (unsigned char *)"foo", 3));
|
||||
int new_len = ziplistLen(zl);
|
||||
TEST_ASSERT(orig_len - 1 == new_len);
|
||||
|
Loading…
x
Reference in New Issue
Block a user