From 72b514cddeaa9794ddc30e1a6e7451f18ddbb644 Mon Sep 17 00:00:00 2001 From: Arkshine Date: Thu, 7 Aug 2014 21:31:53 +0200 Subject: [PATCH] Make sure reserved parameter is a not a negative value. --- amxmodx/datastructs.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/amxmodx/datastructs.cpp b/amxmodx/datastructs.cpp index f4765976..b7ba95a4 100644 --- a/amxmodx/datastructs.cpp +++ b/amxmodx/datastructs.cpp @@ -35,6 +35,11 @@ static cell AMX_NATIVE_CALL ArrayCreate(AMX* amx, cell* params) return -1; } + if (reserved < 0) + { + reserved = 0; + } + // Scan through the vector list to see if any are NULL. // NULL means the vector was previously destroyed. for (unsigned int i=0; i < VectorHolder.length(); ++i)