diff options
| author | Aldrik Ramaekers <aldrik@amftech.nl> | 2022-12-16 23:21:47 +0100 |
|---|---|---|
| committer | Aldrik Ramaekers <aldrik@amftech.nl> | 2022-12-16 23:21:47 +0100 |
| commit | 89984db7afa433e2842c4ef8c8c265a3e3993636 (patch) | |
| tree | 127a939c0d02ba66600c353319be94cdf3906fc0 /src/pathfinding.c | |
| parent | 24a44e57ab9adbb353adac8b83c4441e7adb3751 (diff) | |
work
Diffstat (limited to 'src/pathfinding.c')
| -rw-r--r-- | src/pathfinding.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/pathfinding.c b/src/pathfinding.c index effca06..88bcd23 100644 --- a/src/pathfinding.c +++ b/src/pathfinding.c @@ -87,7 +87,7 @@ bool find_path_to(vec2f start_pos, vec2f end_pos, array *to_fill, pathfinding_re } if (to_fill) { - array_remove_at(to_fill, to_fill->length-1); + if (to_fill->length > 1) array_remove_at(to_fill, to_fill->length-1); //printf("PATHFINDING TOOK: %fms\n", (platform_get_time(TIME_PROCESS, TIME_MS)-timestamp)/1000.0f); } mutex_unlock(&request->mutex); |
