[INTERPRETER]

* BUG: Fix a crash when trying twice accessing a collection without the 
  good number of arguments.


git-svn-id: svn://localhost/gambas/trunk@7395 867c0c6c-44f3-4631-809d-bfa615b0a4ec
This commit is contained in:
Benoît Minisini 2015-10-08 00:55:44 +00:00
parent 29d31b52f0
commit bc5933f905

View file

@ -3536,7 +3536,14 @@ __PUSH_GENERIC:
fast = 0x81 + np; fast = 0x81 + np;
} }
else if (class->quick_array == CQA_COLLECTION) else if (class->quick_array == CQA_COLLECTION)
{
if (np < 1)
THROW(E_NEPARAM);
else if (np > 1)
THROW(E_TMPARAM);
fast = 0xC0; fast = 0xC0;
}
else else
{ {
// Check the symbol existance, but *not virtually* // Check the symbol existance, but *not virtually*
@ -3657,7 +3664,14 @@ __POP_GENERIC:
if (class->quick_array == CQA_ARRAY) if (class->quick_array == CQA_ARRAY)
fast = 1; fast = 1;
else if (class->quick_array == CQA_COLLECTION) else if (class->quick_array == CQA_COLLECTION)
{
if (np < 2)
THROW(E_NEPARAM);
else if (np > 2)
THROW(E_TMPARAM);
fast = 2; fast = 2;
}
else else
{ {
// Check the symbol existance, but *not virtually* // Check the symbol existance, but *not virtually*