aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authornyamatongwe <devnull@localhost>2004-02-20 23:23:13 +0000
committernyamatongwe <devnull@localhost>2004-02-20 23:23:13 +0000
commit09a0b88d44e66d46581ae8f5f226e9fe168450b5 (patch)
treef23e1488c363fd9ea894537a6131af618ad75a3c
parent64d0b92945b616d7796f3fdf2f99d91aa38d70d9 (diff)
downloadscintilla-mirror-09a0b88d44e66d46581ae8f5f226e9fe168450b5.tar.gz
Patch from John Ehresman to fix segfault on long lines.
-rw-r--r--gtk/PlatGTK.cxx4
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;
}
}
}