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.
This commit is contained in:
parent
ff1acefb21
commit
130659e856
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user