reg.exe: Fix broken usage of va_list.

This commit is contained in:
Alexandre Julliard 2009-01-02 22:00:36 +01:00
parent da3202130e
commit 5dcd3c4d1c
1 changed files with 3 additions and 7 deletions

View File

@ -53,18 +53,14 @@ static int reg_printfW(const WCHAR *msg, ...)
return count; return count;
} }
static int reg_message(int msg, ...) static int reg_message(int msg)
{ {
va_list va_args; static const WCHAR formatW[] = {'%','s',0};
WCHAR msg_buffer[8192]; WCHAR msg_buffer[8192];
LoadStringW(GetModuleHandleW(NULL), msg, msg_buffer, LoadStringW(GetModuleHandleW(NULL), msg, msg_buffer,
sizeof(msg_buffer)/sizeof(WCHAR)); sizeof(msg_buffer)/sizeof(WCHAR));
va_start(va_args, msg); return reg_printfW(formatW, msg_buffer);
reg_printfW(msg_buffer, va_args);
va_end(va_args);
return 0;
} }
static int reg_add(WCHAR *key_name, WCHAR *value_name, BOOL value_empty, static int reg_add(WCHAR *key_name, WCHAR *value_name, BOOL value_empty,