summaryrefslogtreecommitdiff
path: root/usr.bin/cut/cut.c
diff options
context:
space:
mode:
authorEitan Adler <eadler@FreeBSD.org>2018-05-23 09:16:20 +0000
committerEitan Adler <eadler@FreeBSD.org>2018-05-23 09:16:20 +0000
commit6872fd3c9470e867df5ff4cdcbcfe758248b6b48 (patch)
tree95427d2417b6cac3e715aa578c876cbb73eb8b01 /usr.bin/cut/cut.c
parentf3e32074e06021dd2849bc2b5c9beb8337d934f2 (diff)
downloadsrc-test2-6872fd3c9470e867df5ff4cdcbcfe758248b6b48.tar.gz
src-test2-6872fd3c9470e867df5ff4cdcbcfe758248b6b48.zip
Notes
Diffstat (limited to 'usr.bin/cut/cut.c')
-rw-r--r--usr.bin/cut/cut.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/usr.bin/cut/cut.c b/usr.bin/cut/cut.c
index a963b7a99dd7..f5847794f313 100644
--- a/usr.bin/cut/cut.c
+++ b/usr.bin/cut/cut.c
@@ -210,6 +210,12 @@ get_list(char *list)
needpos(maxval + 1);
}
+ /* reversed range with autostart */
+ if (maxval < autostart) {
+ maxval = autostart;
+ needpos(maxval + 1);
+ }
+
/* set autostart */
if (autostart)
memset(positions + 1, '1', autostart);