From 71b4d6e01aa72f4ddc9f1077e4cac74197e0a531 Mon Sep 17 00:00:00 2001 From: Robert Jelic <36573031+NoryiE@users.noreply.github.com> Date: Fri, 30 Jun 2023 22:36:02 +0200 Subject: [PATCH] Update Graph.lua Small fix, removed hard cap and changed it to maxentries --- Basalt/objects/Graph.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Basalt/objects/Graph.lua b/Basalt/objects/Graph.lua index 37a4263..8d13728 100644 --- a/Basalt/objects/Graph.lua +++ b/Basalt/objects/Graph.lua @@ -23,7 +23,7 @@ return function(name, basalt) table.insert(graphData, value) self:updateDraw() end - if(#graphData>100)then -- 100 is hard capped to prevent memory leaks + while #graphData>self:getMaxEntries() do table.remove(graphData,1) end return self @@ -105,4 +105,4 @@ return function(name, basalt) object.__index = object return setmetatable(object, base) -end \ No newline at end of file +end