use kMaxPathComponents in proper place
authorEvan Martin <martine@danga.com>
Sat, 23 Apr 2011 20:42:26 +0000 (13:42 -0700)
committerEvan Martin <martine@danga.com>
Sat, 23 Apr 2011 20:42:26 +0000 (13:42 -0700)
src/util.cc

index cb88fdb66d95b87aea3a9aa4e2f84baf8da86eb1..060ea1657838946708c1cc7f94e480148b6f71d1 100644 (file)
@@ -56,7 +56,7 @@ bool CanonicalizePath(string* path, string* err) {
 
   const int kMaxPathComponents = 20;
   const char* starts[kMaxPathComponents];  // Starts of path components.
-  int lens[100];  // Lengths of path components.
+  int lens[kMaxPathComponents];  // Lengths of path components.
 
   int parts_count = 0;  // Number of entries in starts/lens.
   int slash_count = 0;  // Number of components in the original path.