dwrite: Keep string length in text layout.

This commit is contained in:
Nikolay Sivov 2012-10-26 12:09:50 -04:00 committed by Alexandre Julliard
parent bc62a7a9db
commit 1b449f459f
1 changed files with 2 additions and 0 deletions

View File

@ -50,6 +50,7 @@ struct dwrite_textlayout {
LONG ref;
WCHAR *str;
UINT32 len;
struct dwrite_textformat_data format;
};
@ -676,6 +677,7 @@ HRESULT create_textlayout(const WCHAR *str, UINT32 len, IDWriteTextFormat *forma
This->IDWriteTextLayout_iface.lpVtbl = &dwritetextlayoutvtbl;
This->ref = 1;
This->str = heap_strdupnW(str, len);
This->len = len;
memset(&This->format, 0, sizeof(This->format));
/* reference is not kept here, instead copy all underlying data */