diff options
author | nyamatongwe <unknown> | 2004-02-20 23:23:13 +0000 |
---|---|---|
committer | nyamatongwe <unknown> | 2004-02-20 23:23:13 +0000 |
commit | 593d743240bc8bdce8d18b1c0e2b9180a0651a7d (patch) | |
tree | f23e1488c363fd9ea894537a6131af618ad75a3c | |
parent | fe39150e12fb78d22d9a993f3b3549652e04e2c5 (diff) | |
download | scintilla-mirror-593d743240bc8bdce8d18b1c0e2b9180a0651a7d.tar.gz |
Patch from John Ehresman to fix segfault on long lines.
-rw-r--r-- | gtk/PlatGTK.cxx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/gtk/PlatGTK.cxx b/gtk/PlatGTK.cxx index 52977a6f7..3cdc0abfd 100644 --- a/gtk/PlatGTK.cxx +++ b/gtk/PlatGTK.cxx @@ -1186,11 +1186,11 @@ void SurfaceImpl::DrawTextBase(PRectangle rc, Font &font_, int ybase, const char gdk_draw_text_wc(drawable, PFont(font_)->pfont, gc, x, ybase, wcp, lenDraw); wclen -= lenDraw; - wcp += lenDraw; if (wclen > 0) { // Avoid next calculation if possible as may be expensive x += gdk_text_width_wc(PFont(font_)->pfont, wcp, lenDraw); } + wcp += lenDraw; } } } @@ -1200,10 +1200,10 @@ void SurfaceImpl::DrawTextBase(PRectangle rc, Font &font_, int ybase, const char gdk_draw_text(drawable, PFont(font_)->pfont, gc, x, ybase, s, lenDraw); len -= lenDraw; - s += lenDraw; if (len > 0) { // Avoid next calculation if possible as may be expensive x += gdk_text_width(PFont(font_)->pfont, s, lenDraw); } + s += lenDraw; } } } |