aboutsummaryrefslogtreecommitdiff
path: root/tccgen.c
diff options
context:
space:
mode:
Diffstat (limited to 'tccgen.c')
-rw-r--r--tccgen.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/tccgen.c b/tccgen.c
index 2ce6820..cb9765c 100644
--- a/tccgen.c
+++ b/tccgen.c
@@ -4036,6 +4036,10 @@ static void expr_cond(void)
if (const_wanted) {
expr_lor_const();
+ } else {
+ expr_lor();
+ }
+ if (const_wanted || ((vtop->r & (VT_VALMASK | VT_LVAL | VT_SYM)) == VT_CONST)) {
if (tok == '?') {
CType boolean;
int c;
@@ -4057,7 +4061,6 @@ static void expr_cond(void)
vpop();
}
} else {
- expr_lor();
if (tok == '?') {
next();
if (vtop != vstack) {