]> git.pond.sub.org Git - empserver/commit
neweff production work: Fix crash for sea sector
authorMarkus Armbruster <armbru@pond.sub.org>
Fri, 15 Jan 2021 06:47:59 +0000 (07:47 +0100)
committerMarkus Armbruster <armbru@pond.sub.org>
Sun, 17 Jan 2021 20:24:29 +0000 (21:24 +0100)
commit589bc1ed1a33af3c07fa413501acfe119f879cfb
treeb80be6f27ec955bd67252def964370456721c2f3
parent88bd68b88bf8203970323c7bf043116cbd71b0f8
neweff production work: Fix crash for sea sector

The work required for building sea sectors is zero in sect.config.
When a deity runs neweff or production on a sea sector, e.g. with
"neweff *", buildeff() divides by zero.  Same when a player or deity
runs work with an engineer in a sea sector.  Broken in commit
2ffd7b948 "config: Make work to build sectors configurable", v4.4.0

Fix buildeff() to avoid the division.  Change the required work to 100
in sect.config for good measure.

Cover deity use of neweff and production in tests/update.

Signed-off-by: Markus Armbruster <armbru@pond.sub.org>
src/lib/global/sect.config
src/lib/update/sect.c
tests/update/01-1
tests/update/99-POGO
tests/update/journal.log
tests/version/journal.log