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
This commit is contained in:
Manolo Gouy
2010-12-30 15:45:43 +00:00
parent 6e1ce92c62
commit e6a506d1f6
+4 -2
View File
@@ -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;};