Make sure reserved parameter is a not a negative value.

This commit is contained in:
Arkshine 2014-08-07 21:31:53 +02:00
parent aa4e60ae27
commit 72b514cdde

View File

@ -35,6 +35,11 @@ static cell AMX_NATIVE_CALL ArrayCreate(AMX* amx, cell* params)
return -1; return -1;
} }
if (reserved < 0)
{
reserved = 0;
}
// Scan through the vector list to see if any are NULL. // Scan through the vector list to see if any are NULL.
// NULL means the vector was previously destroyed. // NULL means the vector was previously destroyed.
for (unsigned int i=0; i < VectorHolder.length(); ++i) for (unsigned int i=0; i < VectorHolder.length(); ++i)