From 137425f9d25d03ee6aa021e7eb6879674d34eb16 Mon Sep 17 00:00:00 2001 From: Alex Hultman Date: Wed, 24 Feb 2021 12:05:56 +0100 Subject: [PATCH] Oops! Libdeflate inflate never worked --- src/PerMessageDeflate.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/PerMessageDeflate.h b/src/PerMessageDeflate.h index dc5be5d..20f2776 100644 --- a/src/PerMessageDeflate.h +++ b/src/PerMessageDeflate.h @@ -211,7 +211,7 @@ struct InflationStream { char tmp[9]; memcpy(tmp, (char *) compressed.data() + compressed.length(), 9); memcpy((char *) compressed.data() + compressed.length(), "\x00\x00\xff\xff\x01\x00\x00\xff\xff", 9); - libdeflate_result res = libdeflate_deflate_decompress(zlibContext->decompressor, compressed.data(), compressed.length(), buf, 1024, &written); + libdeflate_result res = libdeflate_deflate_decompress(zlibContext->decompressor, compressed.data(), compressed.length() + 9, buf, 1024, &written); memcpy((char *) compressed.data() + compressed.length(), tmp, 9); if (res == 0) {