Commit d014db68 authored by Eric Pouech's avatar Eric Pouech Committed by Alexandre Julliard

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.
parent 00b48f1d
......@@ -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;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment