From 8921ce29627b45d78d1870d550418fc3d13dcdbe Mon Sep 17 00:00:00 2001 From: David Vazgenovich Shakaryan Date: Sat, 30 Apr 2022 05:28:06 -0700 Subject: grow memory for visits as needed --- dartbot.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'dartbot.c') diff --git a/dartbot.c b/dartbot.c index 03b4ec5..1759846 100644 --- a/dartbot.c +++ b/dartbot.c @@ -34,6 +34,8 @@ void test_match(int start_points) void user_visit(struct leg *l) { + if (l->n_visits == l->size_visits) + leg_grow_visits(l); struct visit *v = l->visits + l->n_visits++; char status[100]; -- cgit v1.2.3-70-g09d2