From 293bb39375895437dfc69892d45c69147b468d8d Mon Sep 17 00:00:00 2001 From: mbs Date: Fri, 8 Sep 2023 16:51:08 +0100 Subject: [PATCH] bos#37383: fixed exception in exportToXAOMem() on UB22.04 --- src/ExchangeAPI/ExchangeAPI_Export.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ExchangeAPI/ExchangeAPI_Export.cpp b/src/ExchangeAPI/ExchangeAPI_Export.cpp index e22ff2255..6390b6d97 100644 --- a/src/ExchangeAPI/ExchangeAPI_Export.cpp +++ b/src/ExchangeAPI/ExchangeAPI_Export.cpp @@ -356,7 +356,7 @@ PyObject* exportToXAOMem(const std::shared_ptr & thePart, ExportPtr aXAOExportAPI (new ExchangeAPI_Export (aFeature, theSelectedShape, theAuthor, theGeometryName)); std::string aBuff = aFeature->string(ExchangePlugin_ExportFeature::MEMORY_BUFFER_ID())->value(); - return PyBytes_FromString(aBuff.c_str()); + return PyBytes_FromStringAndSize(aBuff.c_str(), aBuff.length()); } void exportPart(const std::shared_ptr & thePart, -- 2.39.2