[BACK]Return to bad.out_lint CVS log [TXT][DIR] Up to [cvsweb.bsd.lv] / mandoc / regress / roff / shift

File: [cvsweb.bsd.lv] / mandoc / regress / roff / shift / bad.out_lint (download)

Revision 1.2, Sun Apr 24 13:38:48 2022 UTC (2 years, 1 month ago) by schwarze
Branch: MAIN
CVS Tags: HEAD
Changes since 1.1: +3 -2 lines

If a .shift request has a negative argument, do not use a negative array
index but use 0 instead of the argument, just like groff.
Warn about the invalid argument.
While here, fix the column number in another warning message.

Segfault reported by tb@, found with afl(1).

mandoc: bad.in:14:29: ERROR: using macro argument outside macro: \$1
mandoc: bad.in:15:2: ERROR: ignoring request outside macro: shift
mandoc: bad.in:17:31: ERROR: argument number is not numeric: \$x
mandoc: bad.in:19:28: ERROR: using macro argument outside macro: \$1
mandoc: bad.in:20:2: ERROR: ignoring request outside macro: shift
mandoc: bad.in:32:8: ERROR: argument is not numeric, using 1: shift badarg
mandoc: bad.in:32:8: ERROR: negative argument, using 0: shift -1
mandoc: bad.in:32:8: ERROR: excessive shift: 2, but max is 1