Skip to content

Commit

Permalink
More tidyness.
Browse files Browse the repository at this point in the history
  • Loading branch information
EpsilonPrime committed Feb 9, 2024
1 parent db12b3d commit 12b54fe
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion export/planloader/planloader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

#include "planloader.h"

#include <limits>
#include <substrait/common/Io.h>

extern "C" {
Expand All @@ -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<int32_t>(
text.length() &
std::numeric_limits<int32_t>::max());
return newPlan;
}

Expand Down

0 comments on commit 12b54fe

Please sign in to comment.