[INTERPRETER]
* BUG: Fix Choose() when then the choice value is equal to the number of possible results plus one. git-svn-id: svn://localhost/gambas/trunk@5068 867c0c6c-44f3-4631-809d-bfa615b0a4ec
This commit is contained in:
parent
93ef02b4e8
commit
b6cc5cdbb3
@ -333,7 +333,7 @@ void SUBR_choose(ushort code)
|
||||
VALUE_conv_integer(PARAM);
|
||||
val = PARAM->_integer.value;
|
||||
|
||||
if (val >= 1 && val <= NPARAM)
|
||||
if (val >= 1 && val < NPARAM)
|
||||
{
|
||||
VALUE_conv_variant(&PARAM[val]);
|
||||
*RETURN = PARAM[val];
|
||||
|
Loading…
x
Reference in New Issue
Block a user