diff options
| author | Manolo Gouy <Manolo> | 2010-12-30 15:45:43 +0000 |
|---|---|---|
| committer | Manolo Gouy <Manolo> | 2010-12-30 15:45:43 +0000 |
| commit | e6a506d1f60dc59ba52156db3b8ad6ba8a7a8f87 (patch) | |
| tree | 75cd23382cd21514d30be0569d01a395771c0e02 /src | |
| parent | 6e1ce92c62dc25398e9d7e600a9b5e8b6ed9c427 (diff) | |
Fix STR #2498: removed run-time array allocations.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8143 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src')
| -rw-r--r-- | src/Fl_PostScript.cxx | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/Fl_PostScript.cxx b/src/Fl_PostScript.cxx index 2e3abfd23..01fb5c07f 100644 --- a/src/Fl_PostScript.cxx +++ b/src/Fl_PostScript.cxx @@ -1097,8 +1097,8 @@ void Fl_PostScript_Graphics_Driver::transformed_draw(const char* str, int n, dou 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 @@ void Fl_PostScript_Graphics_Driver::rtl_draw(const char* str, int n, int x, int p += len; } transformed_draw(out, p - out, x - w, y); + delete [] unis; + delete [] out; } struct matrix {double a, b, c, d, x, y;}; |
