]> git.ipfire.org Git - thirdparty/zlib-ng.git/commitdiff
Use actual compressed length
authorVladislav Shchapov <vladislav@shchapov.ru>
Fri, 17 May 2024 17:37:29 +0000 (22:37 +0500)
committerHans Kristian Rosbach <hk-github@circlestorm.org>
Mon, 20 May 2024 19:42:31 +0000 (21:42 +0200)
Signed-off-by: Vladislav Shchapov <vladislav@shchapov.ru>
test/test_dict.cc

index af9662e3de2c7e3f137e24ca7bf0946203b2474c..8a882d5770d1c294cf974cdf8f0f3473c352a0ad 100644 (file)
@@ -53,6 +53,8 @@ TEST(dictionary, basic) {
     err = PREFIX(deflateEnd)(&c_stream);
     EXPECT_EQ(err, Z_OK);
 
+    compr_len = (z_size_t)c_stream.total_out;
+
     strcpy((char*)uncompr, "garbage garbage garbage");
 
     d_stream.next_in  = compr;