From 1f99e5b8ca9e5782016b8d83b8506b1845a29311 Mon Sep 17 00:00:00 2001 From: Juan Cruz Viotti Date: Fri, 9 Feb 2024 20:35:52 -0400 Subject: [PATCH] One more Signed-off-by: Juan Cruz Viotti --- .../include/sourcemeta/jsonbinpack/runtime_decoder.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/runtime/include/sourcemeta/jsonbinpack/runtime_decoder.h b/src/runtime/include/sourcemeta/jsonbinpack/runtime_decoder.h index 7701184a..861d0fe4 100644 --- a/src/runtime/include/sourcemeta/jsonbinpack/runtime_decoder.h +++ b/src/runtime/include/sourcemeta/jsonbinpack/runtime_decoder.h @@ -130,9 +130,10 @@ class Decoder : private BasicDecoder { // We trust the encoder that the data we are seeing // corresponds to a valid 64-bit signed integer. return sourcemeta::jsontoolkit::JSON{static_cast( - -(static_cast(this->get_varint() * - options.multiplier)) + - closest_maximum_multiple)}; + -(static_cast( + this->get_varint() * + static_cast(options.multiplier))) + + static_cast(closest_maximum_multiple))}; } else { const std::uint64_t closest_maximum_multiple{ static_cast(std::abs(closest_maximum)) *