Merge pull request #61 from zeromus/getinteger-from-bool
support sq_getinteger() for bools
This commit is contained in:
commit
f7cf119db7
@ -657,6 +657,10 @@ SQRESULT sq_getinteger(HSQUIRRELVM v,SQInteger idx,SQInteger *i)
|
||||
*i = tointeger(o);
|
||||
return SQ_OK;
|
||||
}
|
||||
if(sq_isbool(o)) {
|
||||
*i = SQVM::IsFalse(o)?SQFalse:SQTrue;
|
||||
return SQ_OK;
|
||||
}
|
||||
return SQ_ERROR;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user