Aric Stewart : usp10: Always use a SCRIPT_STATE and SCRIPT_CONTROL structure in ScriptStringAnalyse .
Alexandre Julliard
julliard at winehq.org
Wed Aug 24 14:05:19 CDT 2011
Module: wine
Branch: master
Commit: 1ad1474be5705528a081295e461d3a39931ae96c
URL: http://source.winehq.org/git/wine.git/?a=commit;h=1ad1474be5705528a081295e461d3a39931ae96c
Author: Aric Stewart <aric at codeweavers.com>
Date: Tue Aug 23 12:55:49 2011 -0500
usp10: Always use a SCRIPT_STATE and SCRIPT_CONTROL structure in ScriptStringAnalyse.
---
dlls/usp10/usp10.c | 14 +++++++++++++-
1 files changed, 13 insertions(+), 1 deletions(-)
diff --git a/dlls/usp10/usp10.c b/dlls/usp10/usp10.c
index 50de8bf..e6933bc 100644
--- a/dlls/usp10/usp10.c
+++ b/dlls/usp10/usp10.c
@@ -907,6 +907,8 @@ HRESULT WINAPI ScriptStringAnalyse(HDC hdc, const void *pString, int cString,
{
HRESULT hr = E_OUTOFMEMORY;
StringAnalysis *analysis = NULL;
+ SCRIPT_CONTROL sControl;
+ SCRIPT_STATE sState;
int i, num_items = 255;
TRACE("(%p,%p,%d,%d,%d,0x%x,%d,%p,%p,%p,%p,%p,%p)\n",
@@ -928,7 +930,17 @@ HRESULT WINAPI ScriptStringAnalyse(HDC hdc, const void *pString, int cString,
analysis->clip_len = cString;
analysis->hdc = hdc;
- hr = ScriptItemize(pString, cString, num_items, psControl, psState, analysis->pItem,
+ if (psState)
+ sState = *psState;
+ else
+ memset(&sState, 0, sizeof(SCRIPT_STATE));
+
+ if (psControl)
+ sControl = *psControl;
+ else
+ memset(&sControl, 0, sizeof(SCRIPT_CONTROL));
+
+ hr = ScriptItemize(pString, cString, num_items, &sControl, &sState, analysis->pItem,
&analysis->numItems);
while (hr == E_OUTOFMEMORY)
More information about the wine-cvs
mailing list