]> mj.ucw.cz Git - libucw.git/commitdiff
tableprinter: table_update_ll now uses .idx
authorRobert Kessl <kesslr@centrum.cz>
Mon, 21 Jul 2014 07:39:25 +0000 (09:39 +0200)
committerRobert Kessl <kesslr@centrum.cz>
Mon, 21 Jul 2014 07:39:25 +0000 (09:39 +0200)
ucw/table.c

index 272b694ce0a96496bf7a5a654eca5151f1182d8c..f6d0cba0f9538b789e2cc2774b0a755bb00809aa 100644 (file)
@@ -171,7 +171,7 @@ static void table_update_ll(struct table *tbl)
   }
 
   for(int i = 0; i < cols_to_output; i++) {
-    int col_def_idx = tbl->column_order[i].col_def - tbl->columns;
+    int col_def_idx = tbl->column_order[i].idx;
     int first = tbl->ll_headers[col_def_idx];
     tbl->ll_headers[col_def_idx] = i;
     tbl->column_order[i].next_column = first;