wordpad: Use return value of LoadStringW() instead of calling lstrlenW().

Signed-off-by: Carlo Bramini <carlo_bramini@users.sourceforge.net>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
oldstable
Carlo Bramini 2016-11-12 09:48:47 +01:00 committed by Alexandre Julliard
parent e141d4a1c6
commit 0f4891ff53
1 changed files with 4 additions and 8 deletions

View File

@ -107,20 +107,16 @@ static void DoLoadStrings(void)
HINSTANCE hInstance = GetModuleHandleW(0);
LoadStringW(hInstance, STRING_RICHTEXT_FILES_RTF, p, MAX_STRING_LEN);
p += lstrlenW(p) + 1;
p += 1 + LoadStringW(hInstance, STRING_RICHTEXT_FILES_RTF, p, MAX_STRING_LEN);
lstrcpyW(p, files_rtf);
p += lstrlenW(p) + 1;
LoadStringW(hInstance, STRING_TEXT_FILES_TXT, p, MAX_STRING_LEN);
p += lstrlenW(p) + 1;
p += 1 + LoadStringW(hInstance, STRING_TEXT_FILES_TXT, p, MAX_STRING_LEN);
lstrcpyW(p, files_txt);
p += lstrlenW(p) + 1;
LoadStringW(hInstance, STRING_TEXT_FILES_UNICODE_TXT, p, MAX_STRING_LEN);
p += lstrlenW(p) + 1;
p += 1 + LoadStringW(hInstance, STRING_TEXT_FILES_UNICODE_TXT, p, MAX_STRING_LEN);
lstrcpyW(p, files_txt);
p += lstrlenW(p) + 1;
LoadStringW(hInstance, STRING_ALL_FILES, p, MAX_STRING_LEN);
p += lstrlenW(p) + 1;
p += 1 + LoadStringW(hInstance, STRING_ALL_FILES, p, MAX_STRING_LEN);
lstrcpyW(p, files_all);
p += lstrlenW(p) + 1;
*p = '\0';