Fix streamIteratorRemoveEntry() to update elements count.

Close #4989.
This commit is contained in:
antirez 2018-06-06 11:40:19 +02:00
parent 0a698e499a
commit b61416bdf4

View File

@ -691,6 +691,9 @@ void streamIteratorRemoveEntry(streamIterator *si, streamID *current) {
aux = lpGetInteger(p);
lp = lpReplaceInteger(lp,&p,aux+1);
/* Update the number of entries counter. */
si->stream->length--;
/* Re-seek the iterator to fix the now messed up state. */
streamID start, end;
if (si->rev) {