mirror of
https://github.com/cappuccino/cappuccino.git
synced 2026-10-04 08:06:16 +00:00
Fixed: Return NULL when out of bounce
This commit is contained in:
1 parent
e4560df62f
commit
3e0a6ea2cf
1 file changed
+18
-2
+18
-2
@@ -1031,13 +1031,29 @@ GLOBAL(method_getTypes) = function(/*Method*/ aMethod)
|
||||
GLOBAL(method_copyReturnType) = function(/*Method*/ aMethod)
|
||||
{
|
||||
var types = aMethod.method_types;
|
||||
return types ? types[0] : NULL;
|
||||
|
||||
if (types)
|
||||
{
|
||||
var argType = types[0];
|
||||
|
||||
return argType != NULL ? argType : NULL;
|
||||
}
|
||||
else
|
||||
return NULL;
|
||||
}
|
||||
|
||||
GLOBAL(method_copyArgumentType) = function(/*Method*/ aMethod, /*unsigned int*/ index)
|
||||
{
|
||||
var types = aMethod.method_types;
|
||||
return types ? types[index + 1] : NULL;
|
||||
|
||||
if (types)
|
||||
{
|
||||
var argType = types[index + 1];
|
||||
|
||||
return argType != NULL ? argType : NULL;
|
||||
}
|
||||
else
|
||||
return NULL;
|
||||
}
|
||||
|
||||
GLOBAL(method_getImplementation) = function(/*Method*/ aMethod)
|
||||
|
||||
Reference in new issue
Block a user