From 18fdd3f7080cc21ff3de8f1ec40d2e57e0d192b9 Mon Sep 17 00:00:00 2001 From: Uwe Date: Fri, 27 Jan 2023 02:29:59 +0100 Subject: [PATCH] [Gui] View3DInventorViewer: fix a GH action report - use sizeof instead of the hardcoded number --- src/Gui/View3DInventorViewer.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Gui/View3DInventorViewer.cpp b/src/Gui/View3DInventorViewer.cpp index 4ef4fd653f..4880fd155d 100644 --- a/src/Gui/View3DInventorViewer.cpp +++ b/src/Gui/View3DInventorViewer.cpp @@ -3358,7 +3358,9 @@ SoPath* View3DInventorViewer::pickFilterCB(void* viewer, const SoPickedPoint* pp std::string e = vp->getElement(pp->getDetail()); vp->getSelectionShape(e.c_str()); static char buf[513]; - snprintf(buf,512,"Hovered: %s (%f,%f,%f)" + snprintf(buf, + sizeof(buf), + "Hovered: %s (%f,%f,%f)" ,e.c_str() ,pp->getPoint()[0] ,pp->getPoint()[1]