diff options
| author | Kirill Petrashin <kirill8201@yandex.ru> | 2026-04-03 17:59:33 +0300 |
|---|---|---|
| committer | Kirill Petrashin <kirill8201@yandex.ru> | 2026-04-03 17:59:33 +0300 |
| commit | 6ea83172b08b0e8fe1c0fd3a84d2bd5da954d6cc (patch) | |
| tree | c68aee3ae47ffb54365077c5a2b753b5bf43a2ed /path.h | |
| parent | 104d23d1e4949fe01038f4a2fd706acf163b55c9 (diff) | |
| download | astar-6ea83172b08b0e8fe1c0fd3a84d2bd5da954d6cc.tar.xz | |
Make the cost_so_far array dynamic to avoid SEGFAULTs
Diffstat (limited to 'path.h')
| -rw-r--r-- | path.h | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -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_ */ |
