diff options
author | andrew <andrew@FreeBSD.org> | 2013-01-22 05:39:34 +0000 |
---|---|---|
committer | andrew <andrew@FreeBSD.org> | 2013-01-22 05:39:34 +0000 |
commit | d51242018a1e722cfe0abc65de412bcd49825ebc (patch) | |
tree | 5b864aa68ed30721500427890292d495d727ebcd /usr.bin/tr | |
parent | ef3e178ab588d75208e52d8db1cf83af484c2077 (diff) | |
download | FreeBSD-src-d51242018a1e722cfe0abc65de412bcd49825ebc.zip FreeBSD-src-d51242018a1e722cfe0abc65de412bcd49825ebc.tar.gz |
When copying the complement of the string loop to WINT_MAX as we are dealing
with a wint_t. WINT_MAX and WCHAR_MAX are the same on most architectures
except ARM EABI where wint_t is signed and wchar_t is unsigned.
Diffstat (limited to 'usr.bin/tr')
-rw-r--r-- | usr.bin/tr/tr.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/usr.bin/tr/tr.c b/usr.bin/tr/tr.c index c2b6bf8..6eea2cb 100644 --- a/usr.bin/tr/tr.c +++ b/usr.bin/tr/tr.c @@ -47,6 +47,7 @@ static const char sccsid[] = "@(#)tr.c 8.2 (Berkeley) 5/4/95"; #include <err.h> #include <limits.h> #include <locale.h> +#include <stdint.h> #include <stdio.h> #include <stdlib.h> #include <string.h> @@ -267,7 +268,7 @@ endloop: */ s2.str = argv[1]; s2.state = NORMAL; - for (cnt = 0; cnt < WCHAR_MAX; cnt++) { + for (cnt = 0; cnt < WINT_MAX; cnt++) { if (Cflag && !iswrune(cnt)) continue; if (cmap_lookup(map, cnt) == OOBCH) { |