summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--perl.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/perl.c b/perl.c
index 7652052242..827191520f 100644
--- a/perl.c
+++ b/perl.c
@@ -4529,7 +4529,7 @@ S_mayberelocate(pTHX_ const char *const dir, STRLEN len, U32 flags)
if ((unix = tounixspec_ts(SvPV(libdir,len),NULL)) != NULL) {
len = strlen(unix);
- while (unix[len-1] == '/') len--; /* Cosmetic */
+ while (len > 1 && unix[len-1] == '/') len--; /* Cosmetic */
sv_usepvn(libdir,unix,len);
}
else