fixed bug #1235875
- only increment initial array length when actually adding items - if array index equals array count, the count should also be raised git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@4419 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
parent
dd9f82b4de
commit
c20146ce03
1 changed files with 4 additions and 2 deletions
|
@ -509,7 +509,9 @@ void ParseString(char *&sp, ExpressionItem* &itemplace)
|
|||
while (*sp != '}')
|
||||
{
|
||||
sp++;
|
||||
ParseString(sp, ad->array[ad->count++]);
|
||||
ParseString(sp, ad->array[ad->count]);
|
||||
if (ad->array[ad->count])
|
||||
ad->count++;
|
||||
}
|
||||
|
||||
sp++;
|
||||
|
@ -1438,7 +1440,7 @@ void RunTree(ExpressionItem *from, ExpressionItem* &result, int options)
|
|||
aritem->param2 = (EIPARAM) *((__int64*)&(index->param1));
|
||||
|
||||
ArrayDesc *ad = (ArrayDesc*)aritem->param1;
|
||||
if (((int)aritem->param2) > ad->count)
|
||||
if (((int)aritem->param2) >= ad->count)
|
||||
{
|
||||
ad->count = ((int)aritem->param2)+1;
|
||||
while (ad->count > ad->size)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue