fix FB crash

This commit is contained in:
BenCat07 2018-02-25 15:14:14 +01:00 committed by GitHub
parent 4ba8368fb5
commit 4c605cce10
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -65,9 +65,9 @@ float idle_time = 0;
// Vars for breadcrumb followbot
// An array for storing the breadcrumbs
static Vector breadcrumbs[64];
static Vector breadcrumbs[256];
// Int for storing length of array
constexpr int MAX_CRUMBS = 64;
constexpr int MAX_CRUMBS = 256;
// Array Bookkeeping vars
int crumbBottom = 0;
int crumbTop = 0;
@ -855,9 +855,9 @@ void CrumbTopAdd(Vector crumbToAdd)
// Once the crumbs have hit the limit of the array, loop around and over
// write unused spots
if (crumbTop == MAX_CRUMBS)
if (crumbTop >= MAX_CRUMBS + 15)
{
crumbTop = 0;
crumbReset();
}
else
{