Correct off-by-one error.
authorSimon Schubert <corecode@dragonflybsd.org>
Sun, 26 Aug 2007 20:40:55 +0000 (20:40 +0000)
committerSimon Schubert <corecode@dragonflybsd.org>
Sun, 26 Aug 2007 20:40:55 +0000 (20:40 +0000)
commit72aed89a67c692a18dc654c3e3d5c1e3a3e31032
treeef7f500064bd2955c3659064f514d272780c4a81
parent7c71e5cb739e659eac21699af90599354a458274
Correct off-by-one error.

When comparing the command names, we might wind up behind the array,
later dereferencing a dangling pointer.  Terminate the array correctly
and stop processing soon enough.  Additionally, correct the error
output to use errx(), as there is no meaningful errno available.

Differing behavior spotted by use of tinycc.
usr.bin/objformat/objformat.c