From: Karel Zak Date: Wed, 21 Oct 2020 10:45:02 +0000 (+0200) Subject: ul: fix use of unsigned number X-Git-Tag: v2.37-rc1~404 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=9210db64a6e44ba5c6c76446835dd16606b5e79f;p=thirdparty%2Futil-linux.git ul: fix use of unsigned number Signed-off-by: Karel Zak --- diff --git a/text-utils/ul.c b/text-utils/ul.c index 658e7260a6..627fda8024 100644 --- a/text-utils/ul.c +++ b/text-utils/ul.c @@ -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);