allow trailing data
This commit is contained in:
parent
db4913635d
commit
4d2d780a51
1 changed files with 1 additions and 1 deletions
|
@ -415,7 +415,7 @@ proc decodePng*(data: seq[uint8]): Image =
|
||||||
|
|
||||||
prevChunkType = chunkType
|
prevChunkType = chunkType
|
||||||
|
|
||||||
if pos == data.len:
|
if pos == data.len or prevChunkType == "IEND":
|
||||||
break
|
break
|
||||||
|
|
||||||
if prevChunkType != "IEND":
|
if prevChunkType != "IEND":
|
||||||
|
|
Loading…
Reference in a new issue