From 8c6d25f7f8fab5b0793b7632481a8c609a8184e9 Mon Sep 17 00:00:00 2001 From: Mahesh Madhav <67384846+heshpdx@users.noreply.github.com> Date: Fri, 15 Nov 2024 10:39:15 -0800 Subject: [PATCH] Update c/enc/encode.c Co-authored-by: Eugene Kliuchnikov --- c/enc/encode.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/c/enc/encode.c b/c/enc/encode.c index a2cc7cb..a8fdcad 100644 --- a/c/enc/encode.c +++ b/c/enc/encode.c @@ -441,7 +441,7 @@ static BROTLI_BOOL ShouldCompress( static const double kMinEntropy = 7.92; const double bit_cost_threshold = (double)bytes * kMinEntropy * invKSampleRate; - size_t t = (bytes + kSampleRate - 1) * invKSampleRate; + size_t t = (double)(bytes + kSampleRate - 1) * invKSampleRate; uint32_t pos = (uint32_t)last_flush_pos; size_t i; for (i = 0; i < t; i++) {