summaryrefslogtreecommitdiff
path: root/sys/src
diff options
context:
space:
mode:
authorftrvxmtrx <devnull@localhost>2014-04-26 14:26:40 +0200
committerftrvxmtrx <devnull@localhost>2014-04-26 14:26:40 +0200
commit6a905b45604b7d4546e4f9f632b8685c3bda497a (patch)
tree425f8ef911a56a935bec3a1681e4422162de30a4 /sys/src
parent4468438c7030af510f4dc836d1c4af4310149aa3 (diff)
tr: fix 4-byte runes fix (thanks rsc)
Diffstat (limited to 'sys/src')
-rw-r--r--sys/src/cmd/tr.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/src/cmd/tr.c b/sys/src/cmd/tr.c
index 85c76935b..63532a4ab 100644
--- a/sys/src/cmd/tr.c
+++ b/sys/src/cmd/tr.c
@@ -92,7 +92,7 @@ delete(void)
SETBIT(t, c);
}
- last = 0x10000;
+ last = Runemax+1;
while (readrune(0, &c) > 0) {
if(!BITSET(f, c) && (c != last || !BITSET(t,c))) {
last = c;
@@ -132,7 +132,7 @@ complement(void)
else p[i] = i;
}
if (sflag){
- lastc = 0x10000;
+ lastc = Runemax+1;
while (readrune(0, &from) > 0) {
if (from > high)
from = to;
@@ -186,7 +186,7 @@ translit(void)
SETBIT(t,to);
}
if (sflag){
- lastc = 0x10000;
+ lastc = Runemax+1;
while (readrune(0, &from) > 0) {
if (from <= high)
from = p[from];