[PATCH 7/7] regedit: Do not get text for items with an index less than one

Hugh McMaster hugh.mcmaster at outlook.com
Mon May 29 03:21:05 CDT 2017


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

diff --git a/programs/regedit/listview.c b/programs/regedit/listview.c
index caa9a23..358f311 100644
--- a/programs/regedit/listview.c
+++ b/programs/regedit/listview.c
@@ -59,7 +59,7 @@ LPWSTR GetItemText(HWND hwndLV, UINT item)
 {
     LPWSTR newStr, curStr;
     unsigned int maxLen = 128;
-    if (item == 0) return NULL; /* first item is ALWAYS a default */
+    if (item < 1) return NULL; /* first item is ALWAYS a default */
 
     curStr = HeapAlloc(GetProcessHeap(), 0, maxLen * sizeof(WCHAR));
     if (!curStr) return NULL;
-- 
2.7.4




More information about the wine-patches mailing list