Christian Costa : attrib: Do not hardcode number of characters in flags array.

Alexandre Julliard julliard at winehq.org
Tue Mar 27 12:48:07 CDT 2012


Module: wine
Branch: master
Commit: 5d57fc998aa835928b08b995d6c11a115fc6c353
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=5d57fc998aa835928b08b995d6c11a115fc6c353

Author: Christian Costa <titan.costa at gmail.com>
Date:   Mon Mar 26 22:06:09 2012 +0200

attrib: Do not hardcode number of characters in flags array.

---

 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 1bf4f47..a00e104 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-cvs mailing list