Avoid seqno mismatch oops in recursive land unit supply

Before s_commod() attempts to recursively supply a supply unit it
wants to use as supply source, it zaps the unit's load.  When
actually_doit is false, it later restores the old load by overwriting
the change with a saved copy of the unit.  That triggers a seqno
mismatch oops.

Avoid that by copying the new sequence number to the saved copy.
This commit is contained in:
Markus Armbruster 2008-05-28 22:30:36 +02:00
parent 7f17369491
commit aacd0fb754

View file

@ -346,6 +346,7 @@ s_commod(int own, int x, int y, i_type type, int total_wanted,
save = land;
land.lnd_item[type] = 0;
putland(land.lnd_uid, &land);
save.lnd_seqno = land.lnd_seqno;
land.lnd_item[type] =
save.lnd_item[type] + s_commod(own, land.lnd_x, land.lnd_y,