This is an automated email from the ASF dual-hosted git repository. ardovm pushed a commit to branch asan in repository https://gitbox.apache.org/repos/asf/openoffice.git
commit 776d9c2af57e447dd65507250686f55e86f5bae5 Author: Arrigo Marchiori <[email protected]> AuthorDate: Sat Sep 12 22:04:30 2026 +0200 Fix the "skip" logic for the first value in the stack --- main/rsc/source/rscpp/cpp5.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/main/rsc/source/rscpp/cpp5.c b/main/rsc/source/rscpp/cpp5.c index 25b23ac799..e0fd1ecaa5 100644 --- a/main/rsc/source/rscpp/cpp5.c +++ b/main/rsc/source/rscpp/cpp5.c @@ -240,6 +240,7 @@ eval() opp->prec = opdope[OP_END]; /* And its precedence */ opp->skip = 0; /* Not skipping now */ binop = 0; + skip = 0; again: #ifdef DEBUG_EVAL fprintf( pCppOut, "In #if at again: skip = %d, binop = %d, line is: %s", @@ -306,7 +307,9 @@ again: } opp->op = (char)op; opp->prec = (char)prec; - skip = (valp[-1] != 0); /* Short-circuit tester */ + if (valp > value) { + skip = (valp[-1] != 0); /* Short-circuit tester */ + } /* * Do the short-circuit stuff here. Short-circuiting * stops automagically when operators are evaluated.
