aboutsummaryrefslogtreecommitdiff
path: root/toys/posix
diff options
context:
space:
mode:
authorRob Landley <rob@landley.net>2013-11-30 00:57:26 -0600
committerRob Landley <rob@landley.net>2013-11-30 00:57:26 -0600
commit639334be803dae79d69e6d6ca139bb3749c9705d (patch)
tree5ad37fd61078da891675fdff62085d2b31fcf32d /toys/posix
parent76e7916707b5819a1433100bce63b2076639c943 (diff)
downloadtoybox-639334be803dae79d69e6d6ca139bb3749c9705d.tar.gz
Fix cut.
Some commands went in before "pending", and thus need cleanup but are enabled in defconfig. The fact cut used a function out of lib/pending.c is a hint it might be in this category...
Diffstat (limited to 'toys/posix')
-rw-r--r--toys/posix/cut.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/toys/posix/cut.c b/toys/posix/cut.c
index abf944de..5ca466dc 100644
--- a/toys/posix/cut.c
+++ b/toys/posix/cut.c
@@ -82,14 +82,14 @@ static void parse_list(char *list)
//Get start position.
if (*(dtoken = strsep(&ctoken, "-"))) {
- start = get_int_value(dtoken, 0, INT_MAX);
+ start = atolx_range(dtoken, 0, INT_MAX);
start = (start?(start-1):start);
}
//Get end position.
if (!ctoken) end = -1; //case e.g. 1,2,3
else if (*ctoken) {//case e.g. N-M
- end = get_int_value(ctoken, 0, INT_MAX);
+ end = atolx_range(ctoken, 0, INT_MAX);
if (!end) end = INT_MAX;
end--;
if(end == start) end = -1;