NULL terminate candidate array.

This commit is contained in:
Steve 2015-11-11 19:16:24 +00:00
parent 4daeee51e0
commit 70d47a796b
1 changed files with 3 additions and 0 deletions

View File

@ -119,6 +119,9 @@ Entity **getAllEntsWithin(int x, int y, int w, int h, Entity *ignore)
} }
} }
/* NULL terminate, to allow us to loop through them more easily */
candidates[MAX_GRID_CANDIDATES - 1] = NULL;
return candidates; return candidates;
} }