File klogic-1.63-pattern.patch of Package klogic

Index: klogic-1.63/klogic/dlgPattern.cpp
===================================================================
--- klogic-1.63.orig/klogic/dlgPattern.cpp
+++ klogic-1.63/klogic/dlgPattern.cpp
@@ -319,7 +319,11 @@ void KarnaughWidget::drawGroups()
 {
 	int x, y;
 	int maxhier = 100;
-	int minx[100], miny[100], maxx[100], maxy[100], aInit[100];
+    int* minx = new int[100];
+    int* miny = new int[100];
+    int* maxx = new int[100];
+    int* maxy = new int[100];
+    int* aInit = new int[100];
 
 	QColor oCols[] = {Qt::darkMagenta, Qt::red, Qt::green, Qt::blue,
 			   Qt::cyan, Qt::magenta, Qt::gray, Qt::darkYellow,
@@ -426,4 +430,10 @@ void KarnaughWidget::drawGroups()
 		i++;
 	}
 	p.end();
+
+    delete[] minx;
+    delete[] miny;
+    delete[] maxx;
+    delete[] maxy;
+    delete[] aInit;
 }
openSUSE Build Service is sponsored by