[PATCH 6/7] reg: Correctly output the default value name when querying the registry
Hugh McMaster
hugh.mcmaster at outlook.com
Thu Apr 21 06:46:05 CDT 2016
Signed-off-by: Hugh McMaster <hugh.mcmaster at outlook.com>
---
programs/reg/reg.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/programs/reg/reg.c b/programs/reg/reg.c
index 99651f6..ff78e6c 100644
--- a/programs/reg/reg.c
+++ b/programs/reg/reg.c
@@ -554,7 +554,14 @@ static void output_value(const WCHAR *value_name, DWORD type)
WCHAR fmt[] = {' ',' ',' ',' ','%','1',0};
WCHAR newlineW[] = {'\n',0};
- output_string(fmt, value_name);
+ if (value_name && value_name[0])
+ output_string(fmt, value_name);
+ else
+ {
+ WCHAR defval[32];
+ LoadStringW(GetModuleHandleW(NULL), STRING_DEFAULT_VALUE, defval, ARRAY_SIZE(defval));
+ output_string(fmt, defval);
+ }
output_string(fmt, reg_type_to_wchar(type));
output_string(newlineW);
}
--
1.9.1
More information about the wine-patches
mailing list