diff --git a/ChangeLog.txt b/ChangeLog.txt index f203feb375..8a4e7712bf 100644 --- a/ChangeLog.txt +++ b/ChangeLog.txt @@ -10,6 +10,10 @@ * Change, ! Fix, % Optimization, + Addition, - Removal, ; Comment */ +2015-08-01 01:28 UTC+0200 Przemyslaw Czerpak (druzus/at/poczta.onet.pl) + * src/vm/asort.c + * added workaround for bug in 64 bit MinGW builds + 2015-07-31 17:12 UTC+0200 Przemyslaw Czerpak (druzus/at/poczta.onet.pl) * src/vm/asort.c ! fixed missing nStart checking during array items reordering diff --git a/src/vm/asort.c b/src/vm/asort.c index b6cc8e2f8e..00e4266941 100644 --- a/src/vm/asort.c +++ b/src/vm/asort.c @@ -280,7 +280,8 @@ static void hb_arraySortStart( PHB_BASEARRAY pBaseArray, PHB_ITEM pBlock, HB_SIZE * pBuffer, * pDest, * pPos, nPos, nTo; pBuffer = ( HB_SIZE * ) hb_xgrab( sizeof( HB_SIZE ) * 2 * nCount ); - for( nPos = 0; nPos < nCount; ++nPos ) + nPos = nCount; + while( nPos-- ) pBuffer[ nPos ] = nStart + nPos; if( hb_arraySortDO( pBaseArray, pBlock, pBuffer, &pBuffer[ nCount ], nCount ) )