summaryrefslogtreecommitdiff
path: root/doop.c
diff options
context:
space:
mode:
Diffstat (limited to 'doop.c')
-rw-r--r--doop.c14
1 files changed, 4 insertions, 10 deletions
diff --git a/doop.c b/doop.c
index 9dbee678ef..7acad602c4 100644
--- a/doop.c
+++ b/doop.c
@@ -79,10 +79,7 @@ S_do_trans_simple(pTHX_ SV *sv)
c = utf8_to_uv(s, send - s, &ulen, 0);
if (c < 0x100 && (ch = tbl[(short)c]) >= 0) {
matches++;
- if (ch < 0x80)
- *d++ = ch;
- else
- d = uv_to_utf8(d,ch);
+ d = uv_to_utf8(d,ch);
s += ulen;
}
else { /* No match -> copy */
@@ -192,12 +189,9 @@ S_do_trans_complex(pTHX_ SV *sv)/* SPC - NOT OK */
matches--;
}
- if (ch >= 0) {
- if (hasutf)
- d = uv_to_utf8(d, ch);
- else
- *d++ = ch;
- }
+ if (ch >= 0)
+ d = uv_to_utf8(d, ch);
+
matches++;
s += hasutf && *s & 0x80 ? UNISKIP(*s) : 1;