summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlbrecht Schlosser <albrechts.fltk@online.de>2008-12-02 11:10:03 +0000
committerAlbrecht Schlosser <albrechts.fltk@online.de>2008-12-02 11:10:03 +0000
commit0f13d6eff2693436fb05dea6037d83ecbc2798a5 (patch)
tree52d414bfd446380720a26f620e9a215088482caf
parent8d4bff754564d02811e58bd08db481028d5b5900 (diff)
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
-rw-r--r--src/fl_font_win32.cxx3
1 files changed, 2 insertions, 1 deletions
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;}