From 8bde65b4534c8548ec492398c072fcc29408fbfb Mon Sep 17 00:00:00 2001 From: Pawel Date: Thu, 12 Jul 2012 13:13:58 +0200 Subject: [PATCH] 0023268: cppcheck warning: Using size of pointer WIDTHMAP instead of size of its data. Using the size of the array in bytes. --- src/CGM/CGM_Driver.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/CGM/CGM_Driver.cxx b/src/CGM/CGM_Driver.cxx index d2b63b7fa8..a012245e7d 100755 --- a/src/CGM/CGM_Driver.cxx +++ b/src/CGM/CGM_Driver.cxx @@ -382,7 +382,7 @@ void CGM_Driver::InitializeWidthMap (const Handle(Aspect_WidthMap)& aWidthMap) if (WIDTHMAP) delete[] WIDTHMAP; WIDTHMAP = new float[Size]; - memset (WIDTHMAP, 0, sizeof(WIDTHMAP)); + memset (WIDTHMAP, 0, Size * sizeof(float)); for (Standard_Integer i=1; i<= Size; i++) { Standard_Real w = aWidthMap->Entry(i).Width(); WIDTHMAP[aWidthMap->Entry(i).Index()] = (float)w;