empserver/src/lib/subs
Markus Armbruster 84d88442b3 Don't misinterpret blank configuration entries as sentinels
Configuration table entries not defined by builtin and custom
configuration files remain blank.  They get misinterpreted as sentinel
in tables that use one.  Affected are tables product, ship-chr,
plane-chr, land-chr and nuke-chr.  Tables item, sect-chr and
infrastructure are immune despite using a sentinel, because omitting
entries is not permitted there.

Code relying on the sentinel fails to pick up entries after the first
blank one.  They don't get set up correctly, they're invisible to
build and show, and not recognized as symbolic selector values (the
frg in ship ?type=frg).  xdump is fine, because it doesn't rely on
sentinels.  It dumps blank entries normally.

The bugs don't bite in the stock game, because the builtin
configuration files are all dense.

The sentinels are all null strings.  Set them to "" in the affected
tables' oninit callback.  Fix up code iterating over the tables to
ignore such entries.  This is precisely the code relying on sentinels,
plus xdump's xdvisible().
2011-06-25 16:51:56 +02:00
..
aircombat.c Fix use-after-free when plane gets shot down or aborted by flak 2011-06-06 19:21:09 +02:00
askyn.c License upgrade to GPL version 3 or later 2011-04-12 21:20:58 +02:00
aswplnsubs.c License upgrade to GPL version 3 or later 2011-04-12 21:20:58 +02:00
attsub.c Clean up superfluous include of news.h in empobj.h 2011-04-14 19:46:05 +02:00
bigmap.c License upgrade to GPL version 3 or later 2011-04-12 21:20:58 +02:00
border.c License upgrade to GPL version 3 or later 2011-04-12 21:20:58 +02:00
bridgefall.c Update known contributors comments 2011-04-14 20:21:23 +02:00
bsanct.c License upgrade to GPL version 3 or later 2011-04-12 21:20:58 +02:00
caploss.c License upgrade to GPL version 3 or later 2011-04-12 21:20:58 +02:00
check.c Update known contributors comments 2011-04-14 20:21:23 +02:00
coastal.c License upgrade to GPL version 3 or later 2011-04-12 21:20:58 +02:00
control.c Clean up superfluous include of nsc.h in prototypes.h 2011-04-14 19:46:05 +02:00
damage.c License upgrade to GPL version 3 or later 2011-04-12 21:20:58 +02:00
detonate.c Update known contributors comments 2011-04-14 20:21:23 +02:00
disloan.c License upgrade to GPL version 3 or later 2011-04-12 21:20:58 +02:00
distrea.c Clean up superfluous include of nsc.h in prototypes.h 2011-04-14 19:46:05 +02:00
fileinit.c Move pln_oninit(), lnd_oninit(), nuk_oninit() to filetable.c 2011-06-25 16:50:06 +02:00
fortdef.c Update known contributors comments 2011-04-14 20:21:23 +02:00
getbit.c License upgrade to GPL version 3 or later 2011-04-12 21:20:58 +02:00
getele.c License upgrade to GPL version 3 or later 2011-04-12 21:20:58 +02:00
getstarg.c Make generation numbers catch more potential yields on input 2011-04-14 20:21:23 +02:00
getstring.c License upgrade to GPL version 3 or later 2011-04-12 21:20:58 +02:00
journal.c Commit f04d1ae0 made journal escape '\t' again, fix 2011-04-16 13:25:47 +02:00
land.c Move pln_oninit(), lnd_oninit(), nuk_oninit() to filetable.c 2011-06-25 16:50:06 +02:00
landgun.c License upgrade to GPL version 3 or later 2011-04-12 21:20:58 +02:00
list.c License upgrade to GPL version 3 or later 2011-04-12 21:20:58 +02:00
lndsub.c Update known contributors comments 2011-04-14 20:21:23 +02:00
lostsub.c License upgrade to GPL version 3 or later 2011-04-12 21:20:58 +02:00
maps.c Clean up display_region_map() 2011-04-14 20:21:23 +02:00
mission.c Clean up superfluous include of news.h in empobj.h 2011-04-14 19:46:05 +02:00
move.c Clean up move_ground()'s parsing of DIR_MAP 2011-04-14 20:21:23 +02:00
mslsub.c Don't let planes on trading block intercept or interdict 2011-04-17 17:45:50 +02:00
mtch.c License upgrade to GPL version 3 or later 2011-04-12 21:20:58 +02:00
natarg.c License upgrade to GPL version 3 or later 2011-04-12 21:20:58 +02:00
natsub.c License upgrade to GPL version 3 or later 2011-04-12 21:20:58 +02:00
neigh.c License upgrade to GPL version 3 or later 2011-04-12 21:20:58 +02:00
nreport.c Update known contributors comments 2011-04-14 20:21:23 +02:00
nstr.c Update known contributors comments 2011-04-14 20:21:23 +02:00
nuke.c Move pln_oninit(), lnd_oninit(), nuk_oninit() to filetable.c 2011-06-25 16:50:06 +02:00
nxtitem.c License upgrade to GPL version 3 or later 2011-04-12 21:20:58 +02:00
nxtsct.c License upgrade to GPL version 3 or later 2011-04-12 21:20:58 +02:00
onearg.c Make generation numbers catch more potential yields on input 2011-04-14 20:21:23 +02:00
paths.c Clean up path finding in getpath() 2011-04-12 21:51:32 +02:00
plane.c Move pln_oninit(), lnd_oninit(), nuk_oninit() to filetable.c 2011-06-25 16:50:06 +02:00
plnsub.c Update known contributors comments 2011-04-14 20:21:23 +02:00
pr.c New journal event "output" 2011-04-14 20:21:21 +02:00
radmap.c Update known contributors comments 2011-04-14 20:21:23 +02:00
rej.c Update known contributors comments 2011-04-14 20:21:23 +02:00
retreat.c License upgrade to GPL version 3 or later 2011-04-12 21:20:58 +02:00
sarg.c Update known contributors comments 2011-04-14 20:21:23 +02:00
satmap.c Simplify satmap() with snxtitem_use_condarg(), snxtsct_use_condarg() 2011-04-14 20:21:21 +02:00
sect.c Update known contributors comments 2011-04-14 20:21:23 +02:00
sectdamage.c License upgrade to GPL version 3 or later 2011-04-12 21:20:58 +02:00
ship.c License upgrade to GPL version 3 or later 2011-04-12 21:20:58 +02:00
show.c Don't misinterpret blank configuration entries as sentinels 2011-06-25 16:51:56 +02:00
shpsub.c Update known contributors comments 2011-04-14 20:21:23 +02:00
snxtitem.c Make generation numbers catch more potential yields on input 2011-04-14 20:21:23 +02:00
snxtsct.c Make generation numbers catch more potential yields on input 2011-04-14 20:21:23 +02:00
supply.c Optimize s_commod()'s harbor check for embarked land units 2011-04-12 21:51:31 +02:00
takeover.c Update known contributors comments 2011-04-14 20:21:23 +02:00
trdsub.c License upgrade to GPL version 3 or later 2011-04-12 21:20:58 +02:00
trechk.c Update known contributors comments 2011-04-14 20:21:23 +02:00
unitsub.c Rename obj_nameof() to unit_nameof() and move to unitsub.c 2011-06-25 16:50:20 +02:00
whatitem.c License upgrade to GPL version 3 or later 2011-04-12 21:20:58 +02:00
wu.c License upgrade to GPL version 3 or later 2011-04-12 21:20:58 +02:00