From 4c605cce10f87b91b3890c09e7630b0eb39cb1e0 Mon Sep 17 00:00:00 2001 From: BenCat07 Date: Sun, 25 Feb 2018 15:14:14 +0100 Subject: [PATCH] fix FB crash --- src/hacks/FollowBot.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/hacks/FollowBot.cpp b/src/hacks/FollowBot.cpp index 46873b3e..10c39c7a 100644 --- a/src/hacks/FollowBot.cpp +++ b/src/hacks/FollowBot.cpp @@ -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 {