From dbcf003f3422b64d9410f7e17abfa25c1fde97c4 Mon Sep 17 00:00:00 2001 From: wmayer Date: Thu, 27 Aug 2020 15:11:30 +0200 Subject: [PATCH] Mesh: [skip ci] fix bug in binary PLY export for mesh with colors --- src/Mod/Mesh/App/Core/MeshIO.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Mod/Mesh/App/Core/MeshIO.cpp b/src/Mod/Mesh/App/Core/MeshIO.cpp index 0e6d263247..bbec4d747e 100644 --- a/src/Mod/Mesh/App/Core/MeshIO.cpp +++ b/src/Mod/Mesh/App/Core/MeshIO.cpp @@ -2597,9 +2597,9 @@ bool MeshOutput::SaveBinaryPLY (std::ostream &out) const } if (saveVertexColor) { const App::Color& c = _material->diffuseColor[i]; - int r = (int)(255.0f * c.r); - int g = (int)(255.0f * c.g); - int b = (int)(255.0f * c.b); + uint8_t r = uint8_t(255.0f * c.r); + uint8_t g = uint8_t(255.0f * c.g); + uint8_t b = uint8_t(255.0f * c.b); os << r << g << b; } }