mirror of
https://github.com/fltk/fltk.git
synced 2026-05-28 03:15:21 +08:00
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:
@@ -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) {
|
void Fl_PostScript_Graphics_Driver::rtl_draw(const char* str, int n, int x, int y) {
|
||||||
const char *last = str + n;
|
const char *last = str + n;
|
||||||
const char *str2 = str;
|
const char *str2 = str;
|
||||||
unsigned unis[n + 1];
|
unsigned int *unis = new unsigned int[n + 1];
|
||||||
char out[n + 1];
|
char *out = new char[n + 1];
|
||||||
int u = 0, len;
|
int u = 0, len;
|
||||||
char *p = out;
|
char *p = out;
|
||||||
double w = fl_width(str, n);
|
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;
|
p += len;
|
||||||
}
|
}
|
||||||
transformed_draw(out, p - out, x - w, y);
|
transformed_draw(out, p - out, x - w, y);
|
||||||
|
delete [] unis;
|
||||||
|
delete [] out;
|
||||||
}
|
}
|
||||||
|
|
||||||
struct matrix {double a, b, c, d, x, y;};
|
struct matrix {double a, b, c, d, x, y;};
|
||||||
|
|||||||
Reference in New Issue
Block a user