summaryrefslogtreecommitdiffstats
path: root/lib/lz4.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/lz4.c')
-rw-r--r--lib/lz4.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/lz4.c b/lib/lz4.c
index 21c8b4c..dd0ed4b 100644
--- a/lib/lz4.c
+++ b/lib/lz4.c
@@ -1185,8 +1185,8 @@ _last_literals:
if (outputDirective == fillOutput) {
/* adapt lastRun to fill 'dst' */
assert(olimit >= op);
- lastRun = (size_t)(olimit-op) - 1;
- lastRun -= (lastRun+240)/255;
+ lastRun = (size_t)(olimit-op) - 1/*token*/;
+ lastRun -= (lastRun + 256 - RUN_MASK) / 256; /*additional length tokens*/
} else {
assert(outputDirective == limitedOutput);
return 0; /* cannot compress within `dst` budget. Stored indexes in hash table are nonetheless fine */