Fix last commit.
authorChristoph Mallon <christoph.mallon@gmx.de>
Tue, 18 Nov 2008 19:29:37 +0000 (19:29 +0000)
committerChristoph Mallon <christoph.mallon@gmx.de>
Tue, 18 Nov 2008 19:29:37 +0000 (19:29 +0000)
[r23779]

parser.c

index a07ee45..39e5dce 100644 (file)
--- a/parser.c
+++ b/parser.c
@@ -9790,7 +9790,7 @@ static void check_conditon_type(expression_t const *const expr,
 {
        type_t *const type = skip_typeref(expr->base.type);
        /* ยง6.8.5:2 */
-       if (is_type_scalar(type) && is_type_valid(type)) {
+       if (!is_type_scalar(type) && is_type_valid(type)) {
                errorf(&expr->base.source_position,
                                "condition of %s statement must have scalar type", stmt_name);
        }