From 0f13d6eff2693436fb05dea6037d83ecbc2798a5 Mon Sep 17 00:00:00 2001 From: Albrecht Schlosser Date: Tue, 2 Dec 2008 11:10:03 +0000 Subject: 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 --- src/fl_font_win32.cxx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/fl_font_win32.cxx b/src/fl_font_win32.cxx index e9204ac59..42ca214d3 100644 --- a/src/fl_font_win32.cxx +++ b/src/fl_font_win32.cxx @@ -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;} -- cgit v1.2.3