From 11a3b2aacf2147cc4e71b25447c4498a67569561 Mon Sep 17 00:00:00 2001 From: Kenzzer Date: Sun, 3 Mar 2024 00:22:47 +0100 Subject: [PATCH 1/3] Fix memory leak in Path.Destroy native --- extension/natives/nextbot/path.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/extension/natives/nextbot/path.cpp b/extension/natives/nextbot/path.cpp index 0d3d3d6..190a566 100644 --- a/extension/natives/nextbot/path.cpp +++ b/extension/natives/nextbot/path.cpp @@ -2,6 +2,9 @@ #include "path/chase.hpp" #include "path/follower.hpp" +#include "NextBotChasePath.h" +#include "NextBotPathFollow.h" + namespace natives::nextbot::path { SMPathFollowerCost::SMPathFollowerCost(INextBot* bot, IPluginFunction* func) : m_pFunc(func), m_bot(bot) @@ -594,7 +597,7 @@ cell_t ComputeToTarget(IPluginContext* context, const cell_t* params) { cell_t Destroy(IPluginContext* context, const cell_t* params) { auto path = Get(context, params[1]); - if (path) { + if (!path) { return 0; } From 66a315937641063b62d687bb8ea4b70e6d5b5e00 Mon Sep 17 00:00:00 2001 From: Kenzzer Date: Sun, 3 Mar 2024 00:23:52 +0100 Subject: [PATCH 2/3] No longer needed --- extension/natives/nextbot/path.cpp | 3 --- 1 file changed, 3 deletions(-) diff --git a/extension/natives/nextbot/path.cpp b/extension/natives/nextbot/path.cpp index 190a566..a7dd29c 100644 --- a/extension/natives/nextbot/path.cpp +++ b/extension/natives/nextbot/path.cpp @@ -2,9 +2,6 @@ #include "path/chase.hpp" #include "path/follower.hpp" -#include "NextBotChasePath.h" -#include "NextBotPathFollow.h" - namespace natives::nextbot::path { SMPathFollowerCost::SMPathFollowerCost(INextBot* bot, IPluginFunction* func) : m_pFunc(func), m_bot(bot) From 11deef55ad66950dd29b3f3fc36d54dd24978e05 Mon Sep 17 00:00:00 2001 From: Kenzzer Date: Sun, 3 Mar 2024 00:58:19 +0100 Subject: [PATCH 3/3] bump product version --- product.version | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/product.version b/product.version index 1cac385..720c738 100644 --- a/product.version +++ b/product.version @@ -1 +1 @@ -1.11.0 +1.11.1