From eb358d77291eba677141bab113dc27d7aabb0f3e Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Mon, 15 Apr 2024 11:44:04 +0200 Subject: Merging upstream version 4:24.2.2. Signed-off-by: Daniel Baumann --- basic/source/comp/loops.cxx | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'basic') diff --git a/basic/source/comp/loops.cxx b/basic/source/comp/loops.cxx index 07aac44943..f903f650a2 100644 --- a/basic/source/comp/loops.cxx +++ b/basic/source/comp/loops.cxx @@ -210,6 +210,11 @@ void SbiParser::For() if( bForEach ) Next(); SbiExpression aLvalue( this, SbOPERAND ); + if (!aLvalue.IsVariable()) + { + bAbort = true; + return; // the error is alredy set in SbiExpression ctor + } aLvalue.Gen(); // variable on the Stack if( bForEach ) -- cgit v1.2.3