Browse Source

(contains_dot_dot): Fix double-dot recognition in case of duplicate /. Patch by Dmitry V. Levin.

Sergey Poznyakoff 17 years ago
parent
commit
e2b8c8fa9f
1 changed files with 1 additions and 2 deletions
  1. 1 2
      src/names.c

+ 1 - 2
src/names.c

@@ -1012,11 +1012,10 @@ contains_dot_dot (char const *name)
       if (p[0] == '.' && p[1] == '.' && (ISSLASH (p[2]) || !p[2]))
 	return 1;
 
-      do
+      while (! ISSLASH (*p))
 	{
 	  if (! *p++)
 	    return 0;
 	}
-      while (! ISSLASH (*p));
     }
 }