diff --git a/grub-core/fs/archelp.c b/grub-core/fs/archelp.c index c85cbfac2..707f9a658 100644 --- a/grub-core/fs/archelp.c +++ b/grub-core/fs/archelp.c @@ -34,12 +34,12 @@ canonicalize (char *name) iptr++; if (iptr[0] == '.' && (iptr[1] == '/' || iptr[1] == 0)) { - iptr += 2; + iptr++; continue; } if (iptr[0] == '.' && iptr[1] == '.' && (iptr[2] == '/' || iptr[2] == 0)) { - iptr += 3; + iptr += 2; if (optr == name) continue; for (optr -= 2; optr >= name && *optr != '/'; optr--);