mirror of
https://github.com/Ylianst/MeshAgent
synced 2025-12-25 04:33:23 +00:00
Fixed CreateVariable, so if a negative number is specified, it throws an exception, instead of critical exiting
This commit is contained in:
@@ -462,7 +462,7 @@ duk_ret_t ILibDuktape_GenericMarshal_CreateVariable(duk_context *ctx)
|
||||
{
|
||||
return(ILibDuktape_Error(ctx, "_GenericMarshal.CreateVariable(): Invalid Parameter"));
|
||||
}
|
||||
|
||||
if (size < 0) { return(ILibDuktape_Error(ctx, "Invalid Size: %d ", size)); }
|
||||
ptr = (char*)ILibMemory_Allocate(size, 0, NULL, NULL);
|
||||
if (str != NULL)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user