Skip to content

Commit

Permalink
lz4: Report compressor failure correctly
Browse files Browse the repository at this point in the history
  • Loading branch information
mgorny committed Sep 24, 2018
1 parent dce4353 commit 8bcfd46
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/compressor.c
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ size_t compressor_compress(uint32_t c,
else
out_bytes = LZ4_compress_limitedOutput(src, dest, length, out_size);

if (out_bytes < 0)
if (out_bytes <= 0)
{
fprintf(stderr, "LZ4 compression failed\n");
return 0;
Expand Down

0 comments on commit 8bcfd46

Please # to comment.