diff --git a/src/Library/src/Auxiliary/lz4_decompressor.cpp b/src/Library/src/Auxiliary/lz4_decompressor.cpp index 203693a9..1c1ff4bf 100644 --- a/src/Library/src/Auxiliary/lz4_decompressor.cpp +++ b/src/Library/src/Auxiliary/lz4_decompressor.cpp @@ -70,9 +70,10 @@ namespace JabyEngine { memcpy(this->dst_adr, data, bytes_copy); this->state.literal_length -= bytes_copy; + bytes_ready += bytes_copy; + if(this->state.literal_length == 0) { - this->state.step = State::Step::ObtainMatchOffset; - bytes_ready += bytes_copy; + this->state.step = State::Step::ObtainMatchOffset; } } break;