summaryrefslogtreecommitdiff
path: root/src/truncate.c
diff options
context:
space:
mode:
authorEric Blake <ebb9@byu.net>2009-05-07 14:27:37 -0600
committerEric Blake <ebb9@byu.net>2009-05-11 05:52:50 -0600
commit60e7332dc08eb0a52822ec192aad5dc50feca7fd (patch)
treeabb69bd957c9e1f1d8d0afd61f97ad8dddc8bed4 /src/truncate.c
parent034cbb392346b16634e3a0f2fa4c67ab8a37fc15 (diff)
downloadcoreutils-60e7332dc08eb0a52822ec192aad5dc50feca7fd.tar.xz
truncate: fix bug in use of isspace
* src/truncate.c (main): Pass unsigned characters to isspace. * NEWS: Mention this.
Diffstat (limited to 'src/truncate.c')
-rw-r--r--src/truncate.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/truncate.c b/src/truncate.c
index 06fa03a03..31b3aa635 100644
--- a/src/truncate.c
+++ b/src/truncate.c
@@ -1,5 +1,5 @@
/* truncate -- truncate or extend the length of files.
- Copyright (C) 2008 Free Software Foundation, Inc.
+ Copyright (C) 2008-2009 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -287,7 +287,7 @@ main (int argc, char **argv)
case 's':
/* skip any whitespace */
- while (isspace (*optarg))
+ while (isspace (to_uchar (*optarg)))
optarg++;
switch (*optarg)
{
@@ -309,7 +309,7 @@ main (int argc, char **argv)
break;
}
/* skip any whitespace */
- while (isspace (*optarg))
+ while (isspace (to_uchar (*optarg)))
optarg++;
if (*optarg == '+' || *optarg == '-')
{