Commit 130659e8 authored by Max Kellermann's avatar Max Kellermann

decoder: fixed assertion failure for decoder==NULL in decoder_read()

The assertion on dc.state in decoder_read() was too strict: when a decoder tried to call decoder_read() from tag_dup(), the decoder state was NONE. Allow this special case.
parent ff1acefb
......@@ -100,7 +100,8 @@ size_t decoder_read(struct decoder *decoder,
{
size_t nbytes;
assert(dc.state == DECODE_STATE_START ||
assert(decoder == NULL ||
dc.state == DECODE_STATE_START ||
dc.state == DECODE_STATE_DECODE);
assert(is != NULL);
assert(buffer != NULL);
......
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