diff options
author | Nathan Vance <nathav63@gmail.com> | 2015-04-29 21:04:29 -0400 |
---|---|---|
committer | Nathan Vance <nathav63@gmail.com> | 2015-04-29 21:04:29 -0400 |
commit | 61477ba75dd35655f38b3f280cd20cbe43b46d5a (patch) | |
tree | 2a234bb75325707c7461ec11bc7a8516cec473da /wonder.c | |
parent | Fixed ai trying to play cards not in its hand (diff) | |
download | 7w-61477ba75dd35655f38b3f280cd20cbe43b46d5a.tar.gz 7w-61477ba75dd35655f38b3f280cd20cbe43b46d5a.tar.bz2 7w-61477ba75dd35655f38b3f280cd20cbe43b46d5a.zip |
Fixed bug causing array content to be overwritten
Diffstat (limited to 'wonder.c')
-rw-r--r-- | wonder.c | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -25,6 +25,7 @@ int* data_getdefinites(int p); int** data_getindefinites(int p); int data_gettotvps(int p); int military_might(int player); +void arraycpy(int *from, int *to, int len); int wonder_numstages(int player) { @@ -63,7 +64,8 @@ int* print_wonder(int x, int y, int player, int cursor) io_printborder(x, y++, 28); //Print resource incomes - int *def = data_getdefinites(player); + int def[GOLD]; + arraycpy(data_getdefinites(player), def, GOLD); def[cards_gettype(data_getwonder(player), 0)]++; int **indef = data_getindefinites(player); y = io_printtext(x, y, 28, "Production:"); |