diff options
| author | Matthias Melcher <fltk@matthiasm.com> | 2010-04-05 21:02:48 +0000 |
|---|---|---|
| committer | Matthias Melcher <fltk@matthiasm.com> | 2010-04-05 21:02:48 +0000 |
| commit | 814da7f392144de2c61d40a052edffdd54523d0a (patch) | |
| tree | 20e36461c5c1c340a494edd173107d0db998d577 /src/Fl_Text_Display.cxx | |
| parent | fca1c022e7affbd01087acea46b321f1648c3c9a (diff) | |
Little fix that will keep Fl_Text_Display from crashing on German umlauts. This is by no means a fix.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@7440 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src/Fl_Text_Display.cxx')
| -rw-r--r-- | src/Fl_Text_Display.cxx | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/Fl_Text_Display.cxx b/src/Fl_Text_Display.cxx index eb0598cdb..31ea985b8 100644 --- a/src/Fl_Text_Display.cxx +++ b/src/Fl_Text_Display.cxx @@ -1543,6 +1543,7 @@ void Fl_Text_Display::draw_vline(int visLineNum, int leftClip, int rightClip, int l = 1; if (*outPtr & 0x80) { l = fl_utf8len(*outPtr); + if (l<=0) l = 1; } charWidth = string_width( &expandedChar[ i ], l, charStyle ); } else @@ -1590,6 +1591,7 @@ void Fl_Text_Display::draw_vline(int visLineNum, int leftClip, int rightClip, int l = 1; if (*outPtr & 0x80) { l = fl_utf8len(*outPtr); + if (l<=0) l = 1; } charWidth = string_width( &expandedChar[ i ], l, charStyle ); } else |
