Add some missing arguments.
This commit is contained in:
parent
9764b165b4
commit
cd0a0da36f
@ -214,7 +214,7 @@ static bool validateIntValue(WrenVM* vm, Value* args, double value,
|
|||||||
{
|
{
|
||||||
if (trunc(value) == value) return true;
|
if (trunc(value) == value) return true;
|
||||||
|
|
||||||
args[0] = wrenStringFormat(vm, "$ must be an integer.");
|
args[0] = wrenStringFormat(vm, "$ must be an integer.", argName);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -244,7 +244,7 @@ static int validateIndexValue(WrenVM* vm, Value* args, int count, double value,
|
|||||||
// Check bounds.
|
// Check bounds.
|
||||||
if (index >= 0 && index < count) return index;
|
if (index >= 0 && index < count) return index;
|
||||||
|
|
||||||
args[0] = wrenStringFormat(vm, "$ out of bounds.");
|
args[0] = wrenStringFormat(vm, "$ out of bounds.", argName);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -698,9 +698,9 @@ ObjModule* wrenNewModule(WrenVM* vm);
|
|||||||
Value wrenNewRange(WrenVM* vm, double from, double to, bool isInclusive);
|
Value wrenNewRange(WrenVM* vm, double from, double to, bool isInclusive);
|
||||||
|
|
||||||
// Creates a new string object from [text], which should be a bare C string
|
// Creates a new string object from [text], which should be a bare C string
|
||||||
// literal. Calling strlen() in the macro and passing in a string literal
|
// literal. This determines the length of the string automatically at compile
|
||||||
// enables most compilers to evaluate the string length at compile time.
|
// time based on the size of the character array -1 for the terminating '\0'.
|
||||||
#define CONST_STRING(vm, text) wrenNewString((vm), (text), strlen(text))
|
#define CONST_STRING(vm, text) wrenNewString((vm), (text), sizeof(text) - 1)
|
||||||
|
|
||||||
// Creates a new string object of [length] and copies [text] into it.
|
// Creates a new string object of [length] and copies [text] into it.
|
||||||
//
|
//
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user