]> git.pond.sub.org Git - empserver/commit
load unload lload lunload: Fix for areas starting with a digit
authorMarkus Armbruster <armbru@pond.sub.org>
Sat, 16 Sep 2017 15:07:10 +0000 (17:07 +0200)
committerMarkus Armbruster <armbru@pond.sub.org>
Tue, 5 Jan 2021 06:25:17 +0000 (07:25 +0100)
commit607f15a6f64fa5e00d7e147f6d8f6cbd523a0d47
tree6647619b74e1def2d67f308302b252d2952d4a6d
parent581732dcd1bc86d9215a06c455338de1a5ba1de4
load unload lload lunload: Fix for areas starting with a digit

load and lload skip foreign ships unless explicitly named, and
suppress some error messages for ships not explicitly named.  Makes
sense, except the check for "explicitly named" is flawed: it checks
whether the argument starts with a digit.  Works as intended for lists
like 1/2/3.  Broken for areas that happen to start with a digit, such
as 0:9,0:5.  Visible in the load-tend test.

Screwed up when the feature was added in Empire 2.

Fix the obvious way: test for NS_LIST instead.  While there, drop the
p && *p guard, because it's always true after snxtitem().

Signed-off-by: Markus Armbruster <armbru@pond.sub.org>
src/lib/commands/load.c
tests/load-tend/01-load-1
tests/load-tend/journal.log