From 12b54fe968124169a1097bea3f3e4b2849bcd757 Mon Sep 17 00:00:00 2001 From: David Sisson Date: Thu, 8 Feb 2024 16:26:02 -0800 Subject: [PATCH] More tidyness. --- export/planloader/planloader.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/export/planloader/planloader.cpp b/export/planloader/planloader.cpp index 6c53e760..34f4f940 100644 --- a/export/planloader/planloader.cpp +++ b/export/planloader/planloader.cpp @@ -2,6 +2,7 @@ #include "planloader.h" +#include #include extern "C" { @@ -27,7 +28,9 @@ SerializedPlan* load_substrait_plan(const char* filename) { std::string text = plan.SerializeAsString(); newPlan->buffer = new char[text.length()+1]; memcpy(newPlan->buffer, text.data(), text.length()+1); - newPlan->size = text.length(); + newPlan->size = static_cast( + text.length() & + std::numeric_limits::max()); return newPlan; }