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.
(cherry picked from commit aacd0fb754
)
This commit is contained in:
parent
2410535a05
commit
080e8db899
1 changed files with 1 additions and 0 deletions
|
@ -361,6 +361,7 @@ s_commod(int own, int x, int y, i_type type, int total_wanted,
|
||||||
save = land;
|
save = land;
|
||||||
land.lnd_item[type] = 0;
|
land.lnd_item[type] = 0;
|
||||||
putland(land.lnd_uid, &land);
|
putland(land.lnd_uid, &land);
|
||||||
|
save.lnd_seqno = land.lnd_seqno;
|
||||||
|
|
||||||
land.lnd_item[type] =
|
land.lnd_item[type] =
|
||||||
save.lnd_item[type] + s_commod(own, land.lnd_x, land.lnd_y,
|
save.lnd_item[type] + s_commod(own, land.lnd_x, land.lnd_y,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue