Bug-fix with non-reference encoding

This commit is contained in:
Ivan Smirnov 2022-01-03 17:11:39 +03:00
parent f3947a2a01
commit e39bec8725

View file

@ -35,7 +35,7 @@ where
if run != 0 {
#[cfg(not(feature = "reference"))]
{
buf = buf.write_one(if run == 1 {
buf = buf.write_one(if run == 1 && i != 1 {
QOI_OP_INDEX | (hash_prev as u8)
} else {
QOI_OP_RUN | (run - 1)