This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Do not invert a NULL cp_list.
[perl5.git] / regcomp.c
index eaee604..165a3c2 100644 (file)
--- a/regcomp.c
+++ b/regcomp.c
@@ -14662,7 +14662,8 @@ parseit:
      * at compile time.  Besides not inverting folded locale now, we can't
      * invert if there are things such as \w, which aren't known until runtime
      * */
-    if (invert
+    if (cp_list
+        && invert
         && ! (ANYOF_FLAGS(ret) & (ANYOF_LOCALE_FLAGS))
        && ! depends_list
        && ! HAS_NONLOCALE_RUNTIME_PROPERTY_DEFINITION)