aboutsummaryrefslogtreecommitdiff
path: root/path.h
diff options
context:
space:
mode:
authorKirill Petrashin <kirill8201@yandex.ru>2026-04-03 17:59:33 +0300
committerKirill Petrashin <kirill8201@yandex.ru>2026-04-03 17:59:33 +0300
commit6ea83172b08b0e8fe1c0fd3a84d2bd5da954d6cc (patch)
treec68aee3ae47ffb54365077c5a2b753b5bf43a2ed /path.h
parent104d23d1e4949fe01038f4a2fd706acf163b55c9 (diff)
downloadastar-6ea83172b08b0e8fe1c0fd3a84d2bd5da954d6cc.tar.xz
Make the cost_so_far array dynamic to avoid SEGFAULTs
Diffstat (limited to 'path.h')
-rw-r--r--path.h4
1 files changed, 4 insertions, 0 deletions
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_ */