From 12e72cf936b37904f0fbae382f771acf835e3564 Mon Sep 17 00:00:00 2001 From: Eric Biggers Date: Fri, 31 Dec 2021 16:04:49 -0600 Subject: [PATCH] deflate_compress: use DEFLATE_END_OF_BLOCK constant --- lib/deflate_compress.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/deflate_compress.c b/lib/deflate_compress.c index 5baf85b..c5ca3b3 100644 --- a/lib/deflate_compress.c +++ b/lib/deflate_compress.c @@ -1738,7 +1738,7 @@ deflate_flush_block(struct libdeflate_compressor * restrict c, static_cost += c->freqs.litlen[sym] * 9; /* Account for the cost of encoding the end-of-block symbol. */ - dynamic_cost += c->codes.lens.litlen[256]; + dynamic_cost += c->codes.lens.litlen[DEFLATE_END_OF_BLOCK]; static_cost += 7; /* Account for the cost of encoding lengths. */