Merge pull request #1372 from hcs64/xnb-lz4-fallthrough

Fallthrough in LZ4 state machine for a MSVC 64 bug
This commit is contained in:
bnnm 2023-06-14 18:26:54 +02:00 committed by GitHub
commit cef5f8ac60
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -154,7 +154,7 @@ static int lz4mg_decompress(lz4mg_stream_t* strm) {
} while (next_len == LZ4MG_VARLEN_CONTINUE);
ctx->state = SET_MATCH;
break;
// Falthrough for MSVC
case SET_MATCH:
ctx->match_len += LZ4MG_MIN_MATCH_LEN;
@ -164,7 +164,7 @@ static int lz4mg_decompress(lz4mg_stream_t* strm) {
ctx->match_pos = LZ4MG_WINDOW_SIZE + ctx->match_pos;
ctx->state = COPY_MATCH;
break;
// Fallthrough for MSVC
case COPY_MATCH:
while (ctx->match_len > 0) {