Skip to content

Commit a0aebb6

Browse files
authored
Reinitialize pointer 'p' after ziplistDeleteRange to fix head deletion bug (valkey-io#537)
Fix https://github.com/valkey-io/valkey/actions/runs/9200055659/job/25305949916 Signed-off-by: Ping Xie <[email protected]>
1 parent c41dd77 commit a0aebb6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/unit/test_ziplist.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -360,7 +360,7 @@ int test_ziplistDeleteInclusiveRange0To0(int argc, char **argv, int flags) {
360360
int orig_len = ziplistLen(zl);
361361

362362
zl = ziplistDeleteRange(zl, 0, 1);
363-
363+
p = ziplistIndex(zl, 0);
364364
TEST_ASSERT(ziplistCompare(p, (unsigned char *)"foo", 3));
365365
int new_len = ziplistLen(zl);
366366
TEST_ASSERT(orig_len - 1 == new_len);

0 commit comments

Comments
 (0)