Module: wine Branch: master Commit: e86a1d623af8daf6c4807198cd53530403454fcc URL: http://source.winehq.org/git/wine.git/?a=commit;h=e86a1d623af8daf6c4807198cd...
Author: Dylan Smith dylan.ah.smith@gmail.com Date: Thu Jul 17 11:55:19 2008 -0400
richedit: Fixed regression that caused endless loop.
---
dlls/riched20/wrap.c | 7 ++++++- 1 files changed, 6 insertions(+), 1 deletions(-)
diff --git a/dlls/riched20/wrap.c b/dlls/riched20/wrap.c index 90dca83..5fe2209 100644 --- a/dlls/riched20/wrap.c +++ b/dlls/riched20/wrap.c @@ -338,7 +338,12 @@ static ME_DisplayItem *ME_WrapHandleRun(ME_WrapContext *wc, ME_DisplayItem *p) /* TAB: we can split before */ if (run->nFlags & MERF_TAB) { wc->bOverflown = TRUE; - return p; + if (wc->pRowStart == p) + /* Don't split before the start of the run, or we will get an + * endless loop. */ + return p->next; + else + return p; } /* graphics: we can split before, if run's width is smaller than row's width */ if ((run->nFlags & MERF_GRAPHICS) && run->nWidth <= wc->nAvailWidth) {