Commit 4059c6ec authored by Alex Henrie's avatar Alex Henrie Committed by Alexandre Julliard

wordpad: Use the wcsdup function instead of reimplementing it.

parent e130ef40
......@@ -627,8 +627,7 @@ static void add_font(struct font_array *fonts, LPCWSTR fontName, DWORD fontType,
fontHeight = ntmc->ntmTm.tmHeight - ntmc->ntmTm.tmInternalLeading;
idx = fonts->count;
fonts->fonts[idx].name = malloc((lstrlenW(fontName) + 1)*sizeof(WCHAR) );
lstrcpyW( fonts->fonts[idx].name, fontName );
fonts->fonts[idx].name = wcsdup(fontName);
fonts->fonts[idx].lParam = MAKELONG(fontType, fontHeight);
fonts->count++;
......
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