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);