From 5d57fc998aa835928b08b995d6c11a115fc6c353 Mon Sep 17 00:00:00 2001 From: Christian Costa Date: Mon, 26 Mar 2012 22:06:09 +0200 Subject: [PATCH] attrib: Do not hardcode number of characters in flags array. --- programs/attrib/attrib.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/programs/attrib/attrib.c b/programs/attrib/attrib.c index 1bf4f47c46..a00e104198 100644 --- a/programs/attrib/attrib.c +++ b/programs/attrib/attrib.c @@ -219,7 +219,7 @@ int wmain(int argc, WCHAR *argv[]) strcpyW(name, curdir); strcatW(name, fd.cFileName); ATTRIB_wprintf(fmt, flags, name); - for (count=0; count < 8; count++) flags[count] = ' '; + for (count = 0; count < (sizeof(flags)/sizeof(WCHAR) - 1); count++) flags[count] = ' '; } } while (FindNextFileW(hff, &fd) != 0); } -- 2.32.0.93.g670b81a890