~sircmpwn/hare-png

ec8373cf16d5b3a86cb954bddc16d745c304884e — Lassi Pulkkinen 1 year, 8 months ago 06e3406
plte_read: Finish chunk reader properly

Call io::read at EOF so that the chunk reader knows to read the
checksum.

Signed-off-by: Lassi Pulkkinen <lassi@pulk.fi>
1 files changed, 2 insertions(+), 0 deletions(-)

M image/png/plte.ha
M image/png/plte.ha => image/png/plte.ha +2 -0
@@ 57,6 57,8 @@ export fn plte_read(pr: *plte_reader, buf: []u32) (size | error) = {
		};
		i += n / 3;
	};
	// required so that the checksum gets read
	assert(io::read(pr.cr, rbuf[..1])? is io::EOF);
	return ncolor;
};