riched20: Correctly handle the wrapping when graphics are used.
Get rid of infinite loops when run's width was larger than the global available width.
This commit is contained in:
parent
00b48f1d21
commit
d014db68d4
|
@ -293,8 +293,13 @@ static ME_DisplayItem *ME_WrapHandleRun(ME_WrapContext *wc, ME_DisplayItem *p)
|
|||
wc->bOverflown = TRUE;
|
||||
return p;
|
||||
}
|
||||
/* graphics or TAB - we can split before */
|
||||
if (run->nFlags & (MERF_GRAPHICS|MERF_TAB)) {
|
||||
/* TAB: we can split before */
|
||||
if (run->nFlags & MERF_TAB) {
|
||||
wc->bOverflown = TRUE;
|
||||
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) {
|
||||
wc->bOverflown = TRUE;
|
||||
return p;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue