diff --git a/harbour/source/compiler/harbour.l b/harbour/source/compiler/harbour.l index 1ea8fecc81..da335ef0d3 100644 --- a/harbour/source/compiler/harbour.l +++ b/harbour/source/compiler/harbour.l @@ -413,7 +413,7 @@ Separator {SpaceTab} return ENDDO; } "end" { /* END can be used in one context only */ - if( _wIfCounter == 0 && _wCaseCounter == 0 && _wCaseCounter == 0 ) + if( _wIfCounter == 0 && _wCaseCounter == 0 && _wWhileCounter == 0 ) GenError( ERR_ENDIF, NULL, NULL ); return END; }