2001-06-24 11:15 UTC-0800 Ron Pinkas <ron@profit-master.com>

* source/vm/arrays.c
     ! Fixed but in hb_arrayDel() which caused a GPF by accessing an item beyond the array end.
This commit is contained in:
Ron Pinkas
2001-06-24 18:12:34 +00:00
parent 001e0a1f43
commit bafe7aa495
2 changed files with 7 additions and 1 deletions

View File

@@ -1,3 +1,7 @@
2001-06-24 11:15 UTC-0800 Ron Pinkas <ron@profit-master.com>
* source/vm/arrays.c
! Fixed but in hb_arrayDel() which caused a GPF by accessing an item beyond the array end.
2001-06-23 21:40 UTC-0800 Ron Pinkas <ron@profit-master.com>
* contrib/rdd_ads/ads1.c
- Removed 2 sets of parentheses in type casts where it was not needed.

View File

@@ -209,8 +209,10 @@ BOOL hb_arrayDel( PHB_ITEM pArray, ULONG ulIndex )
hb_itemClear( pBaseArray->pItems + ( ulIndex - 1 ) );
for( ulIndex--; ulIndex < ulLen; ulIndex++ ) /* move items */
for( ulIndex--; ulIndex < ulLen - 1; ulIndex++ ) /* move items */
{
hb_itemCopy( pBaseArray->pItems + ulIndex, pBaseArray->pItems + ( ulIndex + 1 ) );
}
hb_itemClear( pBaseArray->pItems + ( ulLen - 1 ) );
}