usp10: Bug 17324 change default glyph returned from 0xffff to 0

Hans Leidekker hans at codeweavers.com
Thu Mar 11 07:37:58 CST 2010


On Thursday 11 March 2010 13:51:19 Jeff Latimer wrote:

> This patch fixes bug 17324 http://bugs.winehq.org/show_bug.cgi?id=17324
> The problem is that ScriptShape convert characters to glyphs and there 
> is no translation for '\r'.  ScriptTextOut is called and 
> X11DRV_XRender_ExtTextOut is called eventually.  The glyph is used as an 
> index into an array but as the glyph value is 0xffff it causes an exception.
> 
> This patch converts the NONEXISTING_GLYPHS to 0 (this is the same 
> behaviour as Windows).

It doesn't apply cleanly:

patching file dlls/usp10/tests/usp10.c
Hunk #1 succeeded at 636 (offset -20 lines).
Hunk #2 succeeded at 1411 (offset -20 lines).
patching file dlls/usp10/usp10.c
Hunk #1 succeeded at 1309 (offset -2 lines).

And it has compile warnings:

usp10.c: In function ‘test_ScriptTextOut3’:
usp10.c:664: warning: unused variable ‘sla’
usp10.c:663: warning: unused variable ‘psla’
usp10.c:662: warning: unused variable ‘fTrailing’
usp10.c:661: warning: unused variable ‘iCP’
usp10.c:660: warning: unused variable ‘piX’

It would be better to add this test to the existing tests for ScriptTextOut.
As for the fix, why not remove the GGI_MARK_NONEXISTING_GLYPHS flag?

 -Hans



More information about the wine-devel mailing list