From 1d791ab2d32bd22ff8566e9d86204da48e96a040 Mon Sep 17 00:00:00 2001 From: Karl Williamson Date: Sun, 27 Feb 2011 13:55:03 -0700 Subject: [PATCH] regcomp.c: Convert old-style to inversion list The code that handles a false range in a [character class] hadn't been converted to use inversion lists --- regcomp.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/regcomp.c b/regcomp.c index c4673ec..a737ebe 100644 --- a/regcomp.c +++ b/regcomp.c @@ -9611,7 +9611,8 @@ parseit: } /* a bad range like a-\d, a-[:digit:]. The '-' is taken as a - * literal */ + * literal, as is the character that began the false range, i.e. + * the 'a' in the examples */ if (range) { if (!SIZE_ONLY) { const int w = @@ -9621,15 +9622,14 @@ parseit: "False [] range \"%*.*s\"", w, w, rangebegin); + stored += + set_regclass_bit(pRExC_state, ret, '-', &nonbitmap); if (prevvalue < 256) { stored += set_regclass_bit(pRExC_state, ret, (U8) prevvalue, &nonbitmap); - stored += - set_regclass_bit(pRExC_state, ret, '-', &nonbitmap); } else { - Perl_sv_catpvf(aTHX_ listsv, - "%04"UVxf"\n%04"UVxf"\n", (UV)prevvalue, (UV) '-'); + nonbitmap = add_cp_to_invlist(nonbitmap, prevvalue); } } -- 1.8.3.1