OSDN Git Service

Fix path check
authorYohei Endo <yoheie@gmail.com>
Fri, 14 Oct 2016 09:09:17 +0000 (18:09 +0900)
committerYohei Endo <yoheie@gmail.com>
Fri, 14 Oct 2016 09:09:17 +0000 (18:09 +0900)
src/lharc.c

index 8f28942..64e60db 100644 (file)
@@ -1003,7 +1003,7 @@ include_path_p(path, name)
     char           *n = name;
     while (*path)
         if (*path++ != *n++)
-            return (path[-1] == '/' && *n == '\0');
+            return (path[-1] == '/' && n[-1] == '\0');
     return (*n == '/' || (n != name && path[-1] == '/' && n[-1] == '/'));
 }