From 89984db7afa433e2842c4ef8c8c265a3e3993636 Mon Sep 17 00:00:00 2001 From: Aldrik Ramaekers Date: Fri, 16 Dec 2022 23:21:47 +0100 Subject: work --- src/pathfinding.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/pathfinding.c') 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); -- cgit v1.2.3-70-g09d2