diff options
author | David Vazgenovich Shakaryan <dvshakaryan@gmail.com> | 2022-05-21 16:36:36 -0700 |
---|---|---|
committer | David Vazgenovich Shakaryan <dvshakaryan@gmail.com> | 2022-05-21 16:36:36 -0700 |
commit | c4c7913d5c48958732f645c8a3edb57c9004dd30 (patch) | |
tree | 9f1a04efa3fa1e95793bd710bfb583b8469ae2c0 /match.c | |
parent | e7a2e5e24bf0523fb49a3ce07e3eb96d1fd5aea2 (diff) | |
download | dartboat-c4c7913d5c48958732f645c8a3edb57c9004dd30.tar.gz dartboat-c4c7913d5c48958732f645c8a3edb57c9004dd30.tar.xz |
web: add support for custom matchesmulti
Diffstat (limited to 'match.c')
-rw-r--r-- | match.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -6,7 +6,7 @@ struct leg *leg_init(int points, char *name) { struct leg *l = calloc(1, sizeof(*l)); - l->name = name; + l->name = strdup(name); l->start = l->rem = points; l->size_visits = 16; l->visits = calloc(l->size_visits, sizeof(*(l->visits))); @@ -23,6 +23,7 @@ void leg_free(struct leg *l) free(l->visits[i].ccoords); } free(l->visits); + free(l->name); free(l); } |