mirror of
git://source.winehq.org/git/wine.git
synced 2024-08-31 16:33:38 +00:00
riched20: Do not return incorrect values from ME_CharFromPoint[Cursor].
This commit is contained in:
parent
3a9cfa544a
commit
5e0050d001
|
@ -434,7 +434,7 @@ int ME_CharFromPoint(ME_Context *c, int cx, ME_Run *run)
|
|||
int fit = 0;
|
||||
HGDIOBJ hOldFont;
|
||||
SIZE sz;
|
||||
if (!run->strText->nLen)
|
||||
if (!run->strText->nLen || cx <= 0)
|
||||
return 0;
|
||||
|
||||
if (run->nFlags & MERF_TAB ||
|
||||
|
@ -492,7 +492,7 @@ int ME_CharFromPointCursor(ME_TextEditor *editor, int cx, ME_Run *run)
|
|||
ME_Context c;
|
||||
HGDIOBJ hOldFont;
|
||||
SIZE sz, sz2, sz3;
|
||||
if (!run->strText->nLen)
|
||||
if (!run->strText->nLen || cx <= 0)
|
||||
return 0;
|
||||
|
||||
if (run->nFlags & (MERF_TAB | MERF_ENDCELL))
|
||||
|
|
Loading…
Reference in a new issue