Use ef_blank() when extending treaty, loan, comm and trade file
Only treaty extension initialized ef_type and uid properly. None of them zeroed unused members and holes in the struct. comm and trade extension called ef_extend(), which had no effect, so remove that.
This commit is contained in:
parent
93d8c53f21
commit
2da8d0c796
3 changed files with 6 additions and 8 deletions
|
@ -134,8 +134,7 @@ do_treaty(void)
|
|||
break;
|
||||
}
|
||||
}
|
||||
trty.ef_type = EF_TREATY;
|
||||
trty.trt_uid = nstr.cur;
|
||||
ef_blank(EF_TREATY, nstr.cur, &trty);
|
||||
trty.trt_acond = ourcond;
|
||||
trty.trt_bcond = theircond;
|
||||
trty.trt_status = TS_PROPOSED;
|
||||
|
@ -220,6 +219,7 @@ do_loan(void)
|
|||
if (loan.l_status == LS_FREE)
|
||||
break;
|
||||
}
|
||||
ef_blank(EF_LOAN, nstr.cur, &loan);
|
||||
loan.l_loner = player->cnum;
|
||||
loan.l_lonee = recipient;
|
||||
loan.l_status = LS_PROPOSED;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue