From 0b875f1a61b11b292a2ed311e5859a85a41a3e72 Mon Sep 17 00:00:00 2001 From: Caleb Schilly Date: Wed, 24 Apr 2024 10:10:19 -0400 Subject: [PATCH] #16: tmp CI fixes --- ci/build-and-test-bindings.dockerfile | 2 +- src/vt-tv/utility/qoi_serializer.h | 11 +++++++---- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/ci/build-and-test-bindings.dockerfile b/ci/build-and-test-bindings.dockerfile index 45eca30fa5..f74600fe50 100644 --- a/ci/build-and-test-bindings.dockerfile +++ b/ci/build-and-test-bindings.dockerfile @@ -1,7 +1,7 @@ FROM pierrpebay/vt-tv:master AS build COPY . /opt/src/vt-tv -RUN mkdir -p /opt/build/vt-tv +RUN mkdir -p /opt/build/vt-tv/test_output # setup environment ENV VTTV_VTK_DIR=/opt/build/vtk-build diff --git a/src/vt-tv/utility/qoi_serializer.h b/src/vt-tv/utility/qoi_serializer.h index 53de4f84ae..5210c3dcd6 100644 --- a/src/vt-tv/utility/qoi_serializer.h +++ b/src/vt-tv/utility/qoi_serializer.h @@ -69,10 +69,13 @@ namespace nlohmann } static void from_json(const json &j, VariantTypes &value) { - if (j.is_number_unsigned()) { - value = j.get(); - } else if (j.is_number_integer()) { - value = j.get(); + if (j.is_number_integer()) { + auto number = j.get(); + if (number >= std::numeric_limits::min() && number <= std::numeric_limits::max()) { + value = static_cast(number); + } else { + value = static_cast(number); + } } else if (j.is_number_float()) { value = j.get(); } else if (j.is_string()) {