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]