[PATCH 1/5] reg: Avoid using strlenW to check if a string is valid

Hugh McMaster hugh.mcmaster at outlook.com
Tue May 24 07:48:15 CDT 2016


Signed-off-by: Hugh McMaster <hugh.mcmaster at outlook.com>
---
 programs/reg/reg.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/programs/reg/reg.c b/programs/reg/reg.c
index 7852e74..f8c6103 100644
--- a/programs/reg/reg.c
+++ b/programs/reg/reg.c
@@ -159,7 +159,7 @@ static BOOL ask_confirm(unsigned int msgid, WCHAR *reg_info)
     LoadStringW(hmod, STRING_NO,  Nbuffer, ARRAY_SIZE(Nbuffer));
     LoadStringW(hmod, STRING_DEFAULT_VALUE, defval, ARRAY_SIZE(defval));
 
-    str = (reg_info && strlenW(reg_info)) ? reg_info : defval;
+    str = (reg_info && *reg_info) ? reg_info : defval;
 
     while (1)
     {
-- 
1.9.1




More information about the wine-patches mailing list