Module: wine Branch: master Commit: 95ca444692ee97dc165101c8f29a55b5b514dc75 URL: http://source.winehq.org/git/wine.git/?a=commit;h=95ca444692ee97dc165101c8f2...
Author: Aric Stewart aric@codeweavers.com Date: Thu Oct 6 15:23:45 2011 -0500
usp10: Handle the SSA_PASSWORD flag in ScriptStringAnalyse.
---
dlls/usp10/usp10.c | 11 +++++++++++ 1 files changed, 11 insertions(+), 0 deletions(-)
diff --git a/dlls/usp10/usp10.c b/dlls/usp10/usp10.c index 14f523f..5a8a468 100644 --- a/dlls/usp10/usp10.c +++ b/dlls/usp10/usp10.c @@ -914,6 +914,7 @@ HRESULT WINAPI ScriptStringAnalyse(HDC hdc, const void *pString, int cString, SCRIPT_STATE sState; int i, num_items = 255; BYTE *BidiLevel; + WCHAR *iString = NULL;
TRACE("(%p,%p,%d,%d,%d,0x%x,%d,%p,%p,%p,%p,%p,%p)\n", hdc, pString, cString, cGlyphs, iCharset, dwFlags, iReqWidth, @@ -945,6 +946,14 @@ HRESULT WINAPI ScriptStringAnalyse(HDC hdc, const void *pString, int cString, else memset(&sControl, 0, sizeof(SCRIPT_CONTROL));
+ if (dwFlags & SSA_PASSWORD) + { + iString = heap_alloc(sizeof(WCHAR)*cString); + for (i = 0; i < cString; i++) + iString[i] = *((const WCHAR *)pString); + pString = iString; + } + hr = ScriptItemize(pString, cString, num_items, &sControl, &sState, analysis->pItem, &analysis->numItems);
@@ -1026,9 +1035,11 @@ HRESULT WINAPI ScriptStringAnalyse(HDC hdc, const void *pString, int cString, heap_free(BidiLevel);
*pssa = analysis; + heap_free(iString); return S_OK;
error: + heap_free(iString); heap_free(analysis->glyphs); heap_free(analysis->logattrs); heap_free(analysis->pItem);