Aric Stewart : usp10: Properly handle fonts with scripts without a default language.
Alexandre Julliard
julliard at winehq.org
Mon Jun 11 15:08:07 CDT 2012
Module: wine
Branch: master
Commit: 6c43ef46d85bb37de5ce65a8ae6634e891e5cb07
URL: http://source.winehq.org/git/wine.git/?a=commit;h=6c43ef46d85bb37de5ce65a8ae6634e891e5cb07
Author: Aric Stewart <aric at codeweavers.com>
Date: Mon Jun 11 07:15:11 2012 -0500
usp10: Properly handle fonts with scripts without a default language.
---
dlls/usp10/opentype.c | 9 +++++++--
1 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/dlls/usp10/opentype.c b/dlls/usp10/opentype.c
index 74046fd..1a5d3e4 100644
--- a/dlls/usp10/opentype.c
+++ b/dlls/usp10/opentype.c
@@ -924,10 +924,15 @@ static void GSUB_initialize_language_cache(LoadedScript *script)
if (!script->language_count)
{
+ DWORD offset;
const GSUB_Script* table = script->table;
script->language_count = GET_BE_WORD(table->LangSysCount);
- script->default_language.tag = MS_MAKE_TAG('d','f','l','t');
- script->default_language.table = (const BYTE*)table + GET_BE_WORD(table->DefaultLangSys);
+ offset = GET_BE_WORD(table->DefaultLangSys);
+ if (offset)
+ {
+ script->default_language.tag = MS_MAKE_TAG('d','f','l','t');
+ script->default_language.table = (const BYTE*)table + offset;
+ }
if (script->language_count)
{
More information about the wine-cvs
mailing list