Commit ba0ee349 authored by Dmitry Timoshkov's avatar Dmitry Timoshkov Committed by Alexandre Julliard

DrawTextEx should allocate text buffer on stack for thread safeness.

parent 7e11e528
...@@ -846,7 +846,7 @@ INT WINAPI DrawTextExW( HDC hdc, LPWSTR str, INT i_count, ...@@ -846,7 +846,7 @@ INT WINAPI DrawTextExW( HDC hdc, LPWSTR str, INT i_count,
const WCHAR *strPtr; const WCHAR *strPtr;
WCHAR *retstr, *p_retstr; WCHAR *retstr, *p_retstr;
size_t size_retstr; size_t size_retstr;
static WCHAR line[MAX_STATIC_BUFFER]; WCHAR line[MAX_STATIC_BUFFER];
int len, lh, count=i_count; int len, lh, count=i_count;
TEXTMETRICW tm; TEXTMETRICW tm;
int lmargin = 0, rmargin = 0; int lmargin = 0, rmargin = 0;
...@@ -858,8 +858,8 @@ INT WINAPI DrawTextExW( HDC hdc, LPWSTR str, INT i_count, ...@@ -858,8 +858,8 @@ INT WINAPI DrawTextExW( HDC hdc, LPWSTR str, INT i_count,
int prefix_offset; int prefix_offset;
ellipsis_data ellip; ellipsis_data ellip;
TRACE("%s, %d, [(%ld,%ld),(%ld,%ld)]\n", debugstr_wn (str, count), count, TRACE("%s, %d, [%s] %08x\n", debugstr_wn (str, count), count,
rect->left, rect->top, rect->right, rect->bottom); wine_dbgstr_rect(rect), flags);
if (dtp) TRACE("Params: iTabLength=%d, iLeftMargin=%d, iRightMargin=%d\n", if (dtp) TRACE("Params: iTabLength=%d, iLeftMargin=%d, iRightMargin=%d\n",
dtp->iTabLength, dtp->iLeftMargin, dtp->iRightMargin); dtp->iTabLength, dtp->iLeftMargin, dtp->iRightMargin);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment