Commit dda20542 authored by Pieter Noordhuis's avatar Pieter Noordhuis
Browse files

safety assert in listTypeNext

parent 003f0840
......@@ -5029,6 +5029,9 @@ static void listTypeReleaseIterator(listTypeIterator *li) {
* and advances the position of the iterator. Returns 1 when the current
* entry is in fact an entry, 0 otherwise. */
static int listTypeNext(listTypeIterator *li, listTypeEntry *entry) {
/* Protect from converting when iterating */
redisAssert(li->subject->encoding == li->encoding);
entry->li = li;
if (li->encoding == REDIS_ENCODING_ZIPLIST) {
entry->zi = li->zi;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment