Skip to content

Commit

Permalink
Reinitialize pointer 'p' after ziplistDeleteRange to fix head deletio…
Browse files Browse the repository at this point in the history
…n bug (#537)

Fix
https://github.com/valkey-io/valkey/actions/runs/9200055659/job/25305949916

Signed-off-by: Ping Xie <pingxie@google.com>
  • Loading branch information
PingXie committed May 23, 2024
1 parent c41dd77 commit a0aebb6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/unit/test_ziplist.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit a0aebb6

Please sign in to comment.