Missing break in AstarData.AddGraph()

Hello.

I’ve updated the lastest version. (3.8.7)
When I call AddGraph(), graph object is added to all empty positions in graphs array.
So I added break statement.

		bool foundEmpty = false;
		for (int i = 0; i < graphs.Length; i++) {
			if (graphs[i] == null) {
				graphs[i] = graph;
				graph.graphIndex = (uint)i;
				foundEmpty = true;
				break;
			}
		}
1 Like

Hi

Thank you! It seems I introduced this bug a few months ago when I refactored some code.