diff options
author | Karl Williamson <public@khwilliamson.com> | 2012-01-05 11:44:48 -0700 |
---|---|---|
committer | Karl Williamson <public@khwilliamson.com> | 2012-01-13 09:58:37 -0700 |
commit | 7128c0998502479d590d0d92e174918b65224cb2 (patch) | |
tree | e7cfded71ed5b356154e6220aa3f5d5631d4d7d9 | |
parent | e87973a966ae3ea127fedcbc3981e42656e3a70e (diff) | |
download | perl-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.c | 14 |
1 files changed, 3 insertions, 11 deletions
@@ -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; } |