From 80209ec51c1c30606a7f572c4ecfa1331b1de6c4 Mon Sep 17 00:00:00 2001 From: "Tim J. Robbins" Date: Thu, 15 Jul 2004 08:27:04 +0000 Subject: [PATCH] Avoid passing negative values to isspace() on systems with signed chars. --- usr.bin/fmt/fmt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/usr.bin/fmt/fmt.c b/usr.bin/fmt/fmt.c index a8662fdcf3e3..8a763b5a1d1c 100644 --- a/usr.bin/fmt/fmt.c +++ b/usr.bin/fmt/fmt.c @@ -580,7 +580,7 @@ center_stream(FILE *stream, const char *name) { size_t length; while ((line=get_line(stream, &length)) != 0) { size_t l=length; - while (l>0 && isspace(*line)) { ++line; --l; } + while (l>0 && isspace((unsigned char)*line)) { ++line; --l; } length=l; while (l