summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--toke.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/toke.c b/toke.c
index adc7d26822..aa200963eb 100644
--- a/toke.c
+++ b/toke.c
@@ -6996,7 +6996,7 @@ S_scan_str(pTHX_ char *start, int keep_quoted, int keep_delims)
goto read_more_line;
else {
/* handle quoted delimiters */
- if (*(svlast-1) == '\\') {
+ if (SvCUR(sv) > 1 && *(svlast-1) == '\\') {
char *t;
for (t = svlast-2; t >= SvPVX(sv) && *t == '\\';)
t--;