mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-04-07 01:42:04 +00:00
[qfcc] Check for errors in conditional expressions
This commit is contained in:
parent
53c4c205ca
commit
70bb5c3434
1 changed files with 9 additions and 0 deletions
|
@ -339,6 +339,15 @@ proc_cond (const expr_t *expr)
|
|||
auto test = expr_process (expr->cond.test);
|
||||
auto true_expr = expr_process (expr->cond.true_expr);
|
||||
auto false_expr = expr_process (expr->cond.false_expr);
|
||||
if (is_error (test)) {
|
||||
return test;
|
||||
}
|
||||
if (is_error (true_expr)) {
|
||||
return true_expr;
|
||||
}
|
||||
if (is_error (false_expr)) {
|
||||
return false_expr;
|
||||
}
|
||||
return new_cond_expr (test, true_expr, false_expr);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue