From 814da7f392144de2c61d40a052edffdd54523d0a Mon Sep 17 00:00:00 2001 From: Matthias Melcher Date: Mon, 5 Apr 2010 21:02:48 +0000 Subject: 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 --- src/Fl_Text_Display.cxx | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/Fl_Text_Display.cxx') 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 -- cgit v1.2.3