reg.exe: Fix broken usage of va_list.
This commit is contained in:
parent
da3202130e
commit
5dcd3c4d1c
|
@ -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,
|
||||||
|
|
Loading…
Reference in New Issue