From 6ea83172b08b0e8fe1c0fd3a84d2bd5da954d6cc Mon Sep 17 00:00:00 2001 From: Kirill Petrashin Date: Fri, 3 Apr 2026 17:59:33 +0300 Subject: Make the cost_so_far array dynamic to avoid SEGFAULTs --- path.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'path.h') diff --git a/path.h b/path.h index 12cfa80..002690d 100644 --- a/path.h +++ b/path.h @@ -21,4 +21,8 @@ char **visited_new(size_t width, size_t height); void visited_clear(char **visited, size_t width, size_t height); void visited_free(char **visited, size_t height); +/* Helper funcs for the cost_so_far array */ +size_t **cost_so_far_new(size_t width, size_t height); +void cost_so_far_free(size_t **cost_so_far, size_t height); + #endif /* ASTAR_H_ */ -- cgit v1.2.3