From: mbs Date: Fri, 8 Sep 2023 15:51:08 +0000 (+0100) Subject: bos#37383: fixed exception in exportToXAOMem() on UB22.04 X-Git-Tag: V9_12_0a1~7 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=293bb39375895437dfc69892d45c69147b468d8d;p=modules%2Fshaper.git bos#37383: fixed exception in exportToXAOMem() on UB22.04 --- 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,