diff widgets/WindowShapePreview.cpp @ 1153:c5a82068bd60 3.0-integration

Fix completely bogus allocation that was only shown up because of a compiler warning for int->float conversion possibly restricting value range!
author Chris Cannam
date Thu, 20 Oct 2016 14:06:05 +0100
parents 0edfed2c8482
children 07e8ac88bcce
line wrap: on
line diff
--- a/widgets/WindowShapePreview.cpp	Thu Oct 20 11:20:27 2016 +0100
+++ b/widgets/WindowShapePreview.cpp	Thu Oct 20 14:06:05 2016 +0100
@@ -68,7 +68,7 @@
     
     path = QPainterPath();
 
-    float *acc = new float(w);
+    float *acc = new float[w];
     for (int i = 0; i < w; ++i) acc[i] = 0.f;
     for (int j = 0; j < 3; ++j) {
         for (int i = 0; i < step * 2; ++i) {