[PATCH 5/6] attrib: Do not hardcode number of characters in flags array.

Christian Costa titan.costa at gmail.com
Mon Mar 26 15:06:09 CDT 2012


---
 programs/attrib/attrib.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/programs/attrib/attrib.c b/programs/attrib/attrib.c
index 234e16d..52b602a 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);
     }




More information about the wine-patches mailing list