]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
update. Since the specified column is shifted by one column, subtract it.
authorblacknon <blacknon@orebibou.com>
Mon, 20 Jun 2022 13:56:00 +0000 (22:56 +0900)
committerblacknon <blacknon@orebibou.com>
Mon, 20 Jun 2022 13:56:00 +0000 (22:56 +0900)
text-utils/column.c

index cb40d8f26c2f22c5f941035e0f5bfaafbfb401be..a4ba24dcd30db97ba6407746192fd224b649e8e4 100644 (file)
@@ -358,7 +358,7 @@ static void apply_columnflag_from_list(struct column_control *ctl, const char *l
                /* parse range (N-M) */
                if (strchr(*one, '-') && parse_range(*one, &low, &up, 0) == 0) {
                        for (; low <= up; low++) {
-                               cl = scols_table_get_column(ctl->tab, low);
+                               cl = scols_table_get_column(ctl->tab, low-1);
                                if (cl)
                                        column_set_flag(cl, flag);
                        }