diff options
Diffstat (limited to 'extlinux/main.c')
-rw-r--r-- | extlinux/main.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/extlinux/main.c b/extlinux/main.c index 2cfb1ea6..c28f1907 100644 --- a/extlinux/main.c +++ b/extlinux/main.c @@ -386,7 +386,7 @@ int patch_file_and_bootblock(int fd, const char *dir, int devfd) } subpath = strchr(dirpath, '\0'); - while (--subpath > dirpath) { + while (--subpath >= dirpath) { if (*subpath == '/') { *subpath = '\0'; if (lstat(dirpath, &xdst) || dirst.st_dev != xdst.st_dev) { |