]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
ul: fix use of unsigned number
authorKarel Zak <kzak@redhat.com>
Wed, 21 Oct 2020 10:45:02 +0000 (12:45 +0200)
committerKarel Zak <kzak@redhat.com>
Wed, 21 Oct 2020 10:45:02 +0000 (12:45 +0200)
Signed-off-by: Karel Zak <kzak@redhat.com>
text-utils/ul.c

index 658e7260a67e0e2b5083227dc02c3ede4fdafbd4..627fda80240e85422777a65b9ec9090910de789e 100644 (file)
@@ -482,7 +482,7 @@ static void filter(struct ul_ctl *ctl, struct term_caps const *const tcs, FILE *
        while ((c = getwc(f)) != WEOF) {
                switch (c) {
                case '\b':
-                       set_column(ctl, 0 < (ctl->column - 1) ? ctl->column - 1 : 0);
+                       set_column(ctl, ctl->column && 0 < (ctl->column - 1) ? ctl->column - 1 : 0);
                        continue;
                case '\t':
                        set_column(ctl, (ctl->column + 8) & ~07);