mirror of
https://github.com/fltk/fltk.git
synced 2026-05-21 22:51:41 +08:00
Applying a correction requested by Ian:
"The problem is line 237, the "unsigned len" declaration is potentially crossed by the preceeding goto (line 234) so some compilers don't like that..." Tested okay on cygwin with gcc 3.4.4. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@6535 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
This commit is contained in:
@@ -225,6 +225,7 @@ void fl_text_extents(const char *c, int n, int &dx, int &dy, int &w, int &h) {
|
||||
GLYPHMETRICS metrics;
|
||||
int maxw = 0, maxh = 0, dh;
|
||||
int minx = 0, miny = -999999;
|
||||
unsigned len = 0;
|
||||
|
||||
// Have we loaded the GetGlyphIndicesW function yet?
|
||||
if (have_loaded_GetGlyphIndices == 0) {
|
||||
@@ -234,7 +235,7 @@ void fl_text_extents(const char *c, int n, int &dx, int &dy, int &w, int &h) {
|
||||
if(!fl_GetGlyphIndices) goto exit_error; // No GetGlyphIndices function, use fallback mechanism instead
|
||||
|
||||
// now convert the string to WCHAR and measure it
|
||||
unsigned len = fl_utf8toUtf16(c, n, ext_buff, wc_len);
|
||||
len = fl_utf8toUtf16(c, n, ext_buff, wc_len);
|
||||
if(len >= wc_len) {
|
||||
if(ext_buff) {delete [] ext_buff;}
|
||||
if(gi) {delete [] gi;}
|
||||
|
||||
Reference in New Issue
Block a user