diff --git a/src/main.c b/src/main.c index 1d48cfd..67daf67 100644 --- a/src/main.c +++ b/src/main.c @@ -20,6 +20,7 @@ int main(int argc, char **argv) { /*create trivial path towards the origin*/ p = path_new(&t->map,&t->vehicle); + trial_wait_for_input(t); while(t->alive){ trial_wait_for_input(t); path_execute(t,p); diff --git a/src/path.c b/src/path.c index 1290bb5..c3990a3 100644 --- a/src/path.c +++ b/src/path.c @@ -20,6 +20,8 @@ path *path_new(map* m,vehicle *v){ command* tmp; path* res; double angle, stop; + + res = g_slice_new(path); res->commands = g_queue_new(); /* Calculate a trivial path to the origin*/