Skip to content

Commit 8755ac7

Browse files
committed
Make sure lzbench_zlib_decompress returns correct output size
1 parent 7340072 commit 8755ac7

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

bench/lz_codecs.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1278,7 +1278,7 @@ int64_t lzbench_zlib_decompress(char *inbuf, size_t insize, char *outbuf, size_t
12781278
int err = uncompress((uint8_t*)outbuf, &zdecomplen, (uint8_t*)inbuf, insize);
12791279
if (err != Z_OK)
12801280
return 0;
1281-
return outsize;
1281+
return zdecomplen;
12821282
}
12831283

12841284
#endif
@@ -1309,7 +1309,7 @@ int64_t lzbench_zlib_ng_decompress(char *inbuf, size_t insize, char *outbuf, siz
13091309
int err = zng_uncompress((uint8_t*)outbuf, &zdecomplen, (uint8_t*)inbuf, insize);
13101310
if (err != Z_OK)
13111311
return 0;
1312-
return outsize;
1312+
return zdecomplen;
13131313
}
13141314

13151315
#endif

0 commit comments

Comments
 (0)