summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ext/standard/string.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/standard/string.c b/ext/standard/string.c
index 0fe8796a03..f443519a72 100644
--- a/ext/standard/string.c
+++ b/ext/standard/string.c
@@ -5257,7 +5257,7 @@ state_2:
break;
}
- if (!br && lc != '\"' && *(p-1) == '?') {
+ if (!br && p >= buf + 1 && lc != '\"' && *(p-1) == '?') {
in_q = state = 0;
tp = tbuf;
p++;