aboutsummaryrefslogtreecommitdiff
path: root/util.c
diff options
context:
space:
mode:
authorNathan Vance <nathav63@gmail.com>2015-04-29 21:04:29 -0400
committerNathan Vance <nathav63@gmail.com>2015-04-29 21:04:29 -0400
commit61477ba75dd35655f38b3f280cd20cbe43b46d5a (patch)
tree2a234bb75325707c7461ec11bc7a8516cec473da /util.c
parentFixed ai trying to play cards not in its hand (diff)
download7w-61477ba75dd35655f38b3f280cd20cbe43b46d5a.tar.gz
7w-61477ba75dd35655f38b3f280cd20cbe43b46d5a.tar.bz2
7w-61477ba75dd35655f38b3f280cd20cbe43b46d5a.zip
Fixed bug causing array content to be overwritten
Diffstat (limited to 'util.c')
-rw-r--r--util.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/util.c b/util.c
index 20e8290..fcb67d2 100644
--- a/util.c
+++ b/util.c
@@ -28,6 +28,12 @@ char* get_chararray(int size)
return ret;
}
+void arraycpy(int *from, int *to, int len)
+{
+ int i;
+ for(i = 0; i < len; i++) to[i] = from[i];
+}
+
/* Concatinates a and b and returns a different
string. Only use when returned string can be recycled. */
char* cat(char a[], char b[]) {
bgstack15