]> git.pond.sub.org Git - empserver/commit
Fix navigate and march not to prompt for number of mines to lay
authorMarkus Armbruster <armbru@pond.sub.org>
Sat, 20 Mar 2010 10:24:49 +0000 (11:24 +0100)
committerMarkus Armbruster <armbru@pond.sub.org>
Sun, 21 Mar 2010 08:34:23 +0000 (09:34 +0100)
commit89992611193563b722e08b3e2faa38666c1e1ecf
tree41821149293d8f75a70ebc5faca382db9d8105e2
parent7f3f9c67264dc49e3814cde2d693fe73bfd08ea7
Fix navigate and march not to prompt for number of mines to lay

When sub-command 'd' was used without arguments, do_unit_move() failed
to supply the second argument to mine(), which duly prompted for it.
This contracticted info, and could trigger a generation oops.

do_unit_move() reads the ships into a list.  It re-reads them when it
prompts for sub-commands.  shp_nav_one_sector() writes them back when
it moves ships.

The mine prompt made the list stale.  Movement sub-commands before the
next prompt for sub-commands wrote back stale ships, triggering a
generation oops.  Example: "nav 15 dg".

Broken when mine-laying was added in commits 2438fe7c, v4.3.7.

Same for march, commit 274c8e42, v4.3.7.
(cherry picked from commit 45106ab91ffe6193bc90a725e8a07a7a3997f54c)
src/lib/commands/navi.c