summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--pp.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/pp.c b/pp.c
index 4c5c815fe1..0c9ef631f8 100644
--- a/pp.c
+++ b/pp.c
@@ -644,7 +644,7 @@ PP(pp_study)
}
s = (unsigned char*)(SvPV(sv, len));
pos = len;
- if (pos <= 0 || !SvPOK(sv)) {
+ if (pos <= 0 || !SvPOK(sv) || SvUTF8(sv)) {
/* No point in studying a zero length string, and not safe to study
anything that doesn't appear to be a simple scalar (and hence might
change between now and when the regexp engine runs without our set