diff --git a/tr.c b/tr.c index b40f0cc..361ac40 100644 --- a/tr.c +++ b/tr.c @@ -218,12 +218,6 @@ read: else goto write; } - if (sflag) { - if (r == lastrune) - goto read; - else - goto write; - } if (cflag) goto write; for (m = 0; m < i; m++) @@ -243,6 +237,8 @@ read: m--; r = set2[m].start + (off1 - off2) / set2[m].quant; + if (sflag && (r == lastrune)) + goto read; goto write; } }