This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Tweak S_hsplit() to return early if there are no keys to process.
[perl5.git] / taint.c
diff --git a/taint.c b/taint.c
index 9a296db..4ebba5b 100644 (file)
--- a/taint.c
+++ b/taint.c
@@ -158,9 +158,9 @@ Perl_taint_env(pTHX)
        const char *t = SvPV_const(*svp, len);
        const char * const e = t + len;
        TAINT_set(was_tainted);
-       if (t < e && isALNUM(*t))
+       if (t < e && isWORDCHAR(*t))
            t++;
-       while (t < e && (isALNUM(*t) || strchr("-_.+", *t)))
+       while (t < e && (isWORDCHAR(*t) || strchr("-_.+", *t)))
            t++;
        if (t < e) {
            TAINT;