diff --git a/harbour/ChangeLog b/harbour/ChangeLog index bd61674102..b871b32048 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -1,3 +1,8 @@ +19990604-12:30 EDT David G. Holm + * source/vm/hvm.c + - Corrected HARBOUR ERRORLEVEL() to not change the error level if + it is called with no parameters. + 19990604-18:05 CET Jose Lalin (upload Eddie Runia) * makefile.* descend added diff --git a/harbour/source/vm/hvm.c b/harbour/source/vm/hvm.c index f3edb196f2..3b489b0ba0 100644 --- a/harbour/source/vm/hvm.c +++ b/harbour/source/vm/hvm.c @@ -2228,7 +2228,9 @@ HARBOUR ERRORLEVEL() { BYTE bPrevValue = bErrorLevel; - bErrorLevel = _parni( 1 ); + if( _pcount() > 0 ) + /* Only replace the error level if a parameter was passed */ + bErrorLevel = _parni( 1 ); _retni( bPrevValue ); }