diff options
Diffstat (limited to 'main.c')
| -rw-r--r-- | main.c | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -128,11 +128,13 @@ int main(int argc, char **argv) { case 'n': if (is_maze) { //FIXME: free it all before generating a new one + map_free(map, height); map = rbt_maze_map(mwidth, mheight, (unsigned int) time(NULL)); + path_free(path, height); path = breadth_first_search_path_8dir(map, width, height, start_pos, end_pos, visited, anim); } break; - case 'q': endwin(); return 0; + case 'q': map_free(map, height); path_free(path, height); endwin(); return 0; } } |
