# HG changeset patch # User Darkvater # Date 1167437160 0 # Node ID 525f85bee8f98fa940eba3b89911aa3788a9bb13 # Parent 74a4ba0f41969a3a79b92f80e4fc2a2ac44af05e (svn r7630) -Fix: At the end of the quarter the old economy numbers were shifted up, and the current economy numbers were moved to economy[0]. This was done in one memmove which worked because old_economy was behind cur_economy in the struct. Do not rely on this functionality... diff -r 74a4ba0f4196 -r 525f85bee8f9 economy.c --- a/economy.c Fri Dec 29 23:43:07 2006 +0000 +++ b/economy.c Sat Dec 30 00:06:00 2006 +0000 @@ -589,17 +589,16 @@ FOR_ALL_PLAYERS(p) { if (p->is_active) { - memmove(&p->old_economy, &p->cur_economy, sizeof(p->old_economy)); + memmove(&p->old_economy[1], &p->old_economy[0], sizeof(p->old_economy) - sizeof(p->old_economy[0])); + p->old_economy[0] = p->cur_economy; memset(&p->cur_economy, 0, sizeof(p->cur_economy)); - if (p->num_valid_stat_ent != 24) - p->num_valid_stat_ent++; + if (p->num_valid_stat_ent != 24) p->num_valid_stat_ent++; UpdateCompanyRatingAndValue(p, true); PlayersCheckBankrupt(p); - if (p->block_preview != 0) - p->block_preview--; + if (p->block_preview != 0) p->block_preview--; } }