summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKarl Williamson <public@khwilliamson.com>2012-01-05 11:44:48 -0700
committerKarl Williamson <public@khwilliamson.com>2012-01-13 09:58:37 -0700
commit7128c0998502479d590d0d92e174918b65224cb2 (patch)
treee7cfded71ed5b356154e6220aa3f5d5631d4d7d9
parente87973a966ae3ea127fedcbc3981e42656e3a70e (diff)
downloadperl-7128c0998502479d590d0d92e174918b65224cb2.tar.gz
regcomp.c: put_byte wants an ord, not a utf8 char
These were calling put_byte() incorrectly, with a utf8 char instead of a the ordinal.
-rw-r--r--regcomp.c14
1 files changed, 3 insertions, 11 deletions
diff --git a/regcomp.c b/regcomp.c
index efa446f1c3..a907b7d20d 100644
--- a/regcomp.c
+++ b/regcomp.c
@@ -11944,20 +11944,12 @@ Perl_regprop(pTHX_ const regexp *prog, SV *sv, const regnode *o)
} else if (rangestart != -1) {
if (i <= rangestart + 3)
for (; rangestart < i; rangestart++) {
- const U8 * const e = uvchr_to_utf8(s,rangestart);
- U8 *p;
- for(p = s; p < e; p++)
- put_byte(sv, *p);
+ put_byte(sv, rangestart);
}
else {
- const U8 *e = uvchr_to_utf8(s,rangestart);
- U8 *p;
- for (p = s; p < e; p++)
- put_byte(sv, *p);
+ put_byte(sv, rangestart);
sv_catpvs(sv, "-");
- e = uvchr_to_utf8(s, i-1);
- for (p = s; p < e; p++)
- put_byte(sv, *p);
+ put_byte(sv, i-1);
}
rangestart = -1;
}