X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=doop.c;h=755cbfd16a6be2e30abd389169bd328a04481b63;hb=a403baf6db062a9762514a55376b87d7258108a5;hp=266411a009ca910821da5333d50e951843ec4f0e;hpb=5ad8ef521b3ffc4e6bbbb9941bc4940d442b56b2;p=p5sagit%2Fp5-mst-13.2.git diff --git a/doop.c b/doop.c index 266411a..755cbfd 100644 --- a/doop.c +++ b/doop.c @@ -184,6 +184,7 @@ S_do_trans_complex(pTHX_ SV *sv)/* SPC - NOT OK */ s++; } } + *d = '\0'; SvCUR_set(sv, d - dstart); } else { /* isutf8 */ @@ -343,7 +344,7 @@ S_do_trans_simple_utf8(pTHX_ SV *sv)/* SPC - OK */ } while (s < send) { - if ((uv = swash_fetch(rv, s)) < none) { + if ((uv = swash_fetch(rv, s, TRUE)) < none) { s += UTF8SKIP(s); matches++; d = uvuni_to_utf8(d, uv); @@ -422,7 +423,7 @@ S_do_trans_count_utf8(pTHX_ SV *sv)/* SPC - OK */ send = s + len; while (s < send) { - if ((uv = swash_fetch(rv, s)) < none || uv == extra) + if ((uv = swash_fetch(rv, s, TRUE)) < none || uv == extra) matches++; s += UTF8SKIP(s); } @@ -490,7 +491,7 @@ S_do_trans_complex_utf8(pTHX_ SV *sv) /* SPC - NOT OK */ if (squash) { UV puv = 0xfeedface; while (s < send) { - uv = swash_fetch(rv, s); + uv = swash_fetch(rv, s, TRUE); if (d > dend) { STRLEN clen = d - dstart; @@ -545,7 +546,7 @@ S_do_trans_complex_utf8(pTHX_ SV *sv) /* SPC - NOT OK */ } else { while (s < send) { - uv = swash_fetch(rv, s); + uv = swash_fetch(rv, s, TRUE); if (d > dend) { STRLEN clen = d - dstart; STRLEN nlen = dend - dstart + len + UTF8_MAXLEN;