Ken Thomases : winemac: Don' t query the position of the one-past-the-end character with IMR_QUERYCHARPOSITION.
julliard at wine.codeweavers.com
Wed Jul 16 13:59:56 CDT 2014
Author: Ken Thomases <ken at codeweavers.com>
Date: Wed Jul 16 12:59:03 2014 -0500
winemac: Don't query the position of the one-past-the-end character with IMR_QUERYCHARPOSITION.
This means the resulting rectangle will be short, but we don't have much
choice. Some apps don't cope properly with the one-past-the-end character.
For example, Excel 2007 gets stuck in an infinite loop.
dlls/winemac.drv/ime.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/dlls/winemac.drv/ime.c b/dlls/winemac.drv/ime.c
index b62736f..7f98914 100644
@@ -1509,7 +1509,7 @@ BOOL query_ime_char_rect(macdrv_query* query)
*rect = CGRectMake(charpos.pt.x, charpos.pt.y, 0, charpos.cLineHeight);
/* iterate over rest of length to extend rect */
- for (i = 1; i <= range->length; i++)
+ for (i = 1; i < range->length; i++)
charpos.dwSize = sizeof(charpos);
charpos.dwCharPos = range->location + i;
More information about the wine-cvs