diff --git a/harbour/ChangeLog b/harbour/ChangeLog index 0b3adfb672..b2a559543e 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -1,3 +1,7 @@ +19990604-13:05 EDT David G. Holm + * source/vm/hvm.c + - Corrected ForTest() to use the correct decimal count + 19990604-12:35 EDT David G. Holm * source/rtl/dates.c - Corrected HARBOUR DOW() to use _retni() instead of _retnl() diff --git a/harbour/source/vm/hvm.c b/harbour/source/vm/hvm.c index 3b489b0ba0..82f56f5314 100644 --- a/harbour/source/vm/hvm.c +++ b/harbour/source/vm/hvm.c @@ -863,6 +863,7 @@ void ForTest( void ) /* Test to check the end point of the FOR */ if( IS_NUMERIC( stack.pPos - 1 ) ) { + WORD wDec = stack.pPos->wDec; dStep = PopNumber(); if( dStep > 0 ) /* Positive loop. Use LESS */ Less(); @@ -872,7 +873,7 @@ void ForTest( void ) /* Test to check the end point of the FOR */ printf( "step of zero will cause endless loop" ); /* Add some break code or so... */ iEqual = PopLogical(); /* Logical should be on top of stack */ - PushNumber( dStep, stack.pPos->wDec ); /* Push the step expression back on the stack */ + PushNumber( dStep, wDec ); /* Push the step expression back on the stack */ PushLogical( iEqual ); } else