From ae72ba0563d58d95bbf9be4303f2e9ac8612988f Mon Sep 17 00:00:00 2001 From: Juan Cruz Viotti Date: Fri, 9 Feb 2024 20:19:41 -0400 Subject: [PATCH] Another one Signed-off-by: Juan Cruz Viotti --- src/runtime/include/sourcemeta/jsonbinpack/runtime_encoder.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/runtime/include/sourcemeta/jsonbinpack/runtime_encoder.h b/src/runtime/include/sourcemeta/jsonbinpack/runtime_encoder.h index 706083b6b..46d6d38f9 100644 --- a/src/runtime/include/sourcemeta/jsonbinpack/runtime_encoder.h +++ b/src/runtime/include/sourcemeta/jsonbinpack/runtime_encoder.h @@ -86,7 +86,8 @@ class Encoder : private BasicEncoder { #endif assert(is_byte(enum_maximum - enum_minimum)); this->put_byte(static_cast( - static_cast(value / options.multiplier) - enum_minimum)); + (value / static_cast(options.multiplier)) - + enum_minimum)); } auto FLOOR_MULTIPLE_ENUM_VARINT(const sourcemeta::jsontoolkit::JSON &document,