Fix LZ4 incorrect size bug

This commit is contained in:
Jaby 2023-04-01 14:56:08 +02:00 committed by Jaby
parent 57fe9896e8
commit 39aa274856
1 changed files with 3 additions and 2 deletions

View File

@ -70,9 +70,10 @@ namespace JabyEngine {
memcpy(this->dst_adr, data, bytes_copy); memcpy(this->dst_adr, data, bytes_copy);
this->state.literal_length -= bytes_copy; this->state.literal_length -= bytes_copy;
bytes_ready += bytes_copy;
if(this->state.literal_length == 0) { if(this->state.literal_length == 0) {
this->state.step = State::Step::ObtainMatchOffset; this->state.step = State::Step::ObtainMatchOffset;
bytes_ready += bytes_copy;
} }
} break; } break;