Author: manolo
Date: 2010-12-30 07:45:43 -0800 (Thu, 30 Dec 2010)
New Revision: 8143
Log:
Fix STR #2498: removed run-time array allocations.

Modified:
   branches/branch-1.3/src/Fl_PostScript.cxx

Modified: branches/branch-1.3/src/Fl_PostScript.cxx
===================================================================
--- branches/branch-1.3/src/Fl_PostScript.cxx   2010-12-30 15:35:33 UTC (rev 
8142)
+++ branches/branch-1.3/src/Fl_PostScript.cxx   2010-12-30 15:45:43 UTC (rev 
8143)
@@ -1097,8 +1097,8 @@
 void Fl_PostScript_Graphics_Driver::rtl_draw(const char* str, int n, int x, 
int y) {
   const char *last = str + n;
   const char *str2 = str;
-  unsigned unis[n + 1];
-  char out[n + 1];
+  unsigned int *unis = new unsigned int[n + 1];
+  char *out = new char[n + 1];
   int u = 0, len;
   char *p = out;
   double w = fl_width(str, n);
@@ -1111,6 +1111,8 @@
     p += len;
     }
   transformed_draw(out, p - out, x - w, y);
+  delete [] unis;
+  delete [] out;
 }
 
 struct matrix {double a, b, c, d, x, y;};

_______________________________________________
fltk-commit mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk-commit

Reply via email to