]> git.pond.sub.org Git - empserver/commit - include/sect.h
(SCT_MAXDEF): Make it equal the maximum sector type, not the maximum
authorMarkus Armbruster <armbru@pond.sub.org>
Thu, 22 Jun 2006 17:10:26 +0000 (17:10 +0000)
committerMarkus Armbruster <armbru@pond.sub.org>
Thu, 22 Jun 2006 17:10:26 +0000 (17:10 +0000)
commit2d99971a7fdf7f04cdaf32cdd11420046221e5e1
tree364ecef912b602ffc9cdb1aff0650707509a0d91
parentf9588063ffbc4307e09bdbe4178babb42560ed64
(SCT_MAXDEF): Make it equal the maximum sector type, not the maximum
plus one.  Users changed.  This indirectly fixes off-by-one loop
bounds in budg(), show_sect_build(), show_sect_stats() and
show_sect_capab().  The show bugs were harmless: the loops ran into
the sentinel, which they ignore.  The budg bug was serious: the loop
ran into the entries for SCT_EFFIC.  This lead to a bogus line in the
budget, printing of a null pointer, and doubled sector build cost.
Budget priorities masked this bug until rev. 1.25.
include/sect.h
src/lib/commands/budg.c
src/lib/global/sect.c
src/lib/update/main.c