diff --git a/harbour/ChangeLog b/harbour/ChangeLog index 73e602fc35..8100b414ed 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -8,6 +8,12 @@ 2002-12-01 13:30 UTC+0100 Foo Bar */ +2007-10-08 01:06 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl) + * harbour/source/vm/arrays.c + ! fixed value returned by HB_RASCAN( aVal, bCode ) - it was returning + index -1, f.e. hb_rascan({1,2,3},{|x|x==2}) returned 1 when it + should 2 + 2007-10-06 21:28 UTC-0500 Teo Fonrouge (teo/at/windtelsoft/dot/com) * contrib/tip/thtml.prg * contrib/tip/cgi.prg diff --git a/harbour/source/vm/arrays.c b/harbour/source/vm/arrays.c index 4702cf24c3..39fa2c1546 100644 --- a/harbour/source/vm/arrays.c +++ b/harbour/source/vm/arrays.c @@ -1024,7 +1024,7 @@ ULONG hb_arrayRevScan( PHB_ITEM pArray, PHB_ITEM pValue, ULONG * pulStart, ULONG hb_vmDo( 2 ); if( HB_IS_LOGICAL( hb_stackReturnItem() ) && hb_stackReturnItem()->item.asLogical.value ) - return ulStart; + return ulStart + 1; } while( --ulCount && ulStart-- ); }