diff --git a/_typos.toml b/_typos.toml index c1e798008..c465daf12 100644 --- a/_typos.toml +++ b/_typos.toml @@ -1,4 +1,4 @@ -files.extend-exclude = ["distr/*"] +files.extend-exclude = ["distr/*", "test/script/Fuzzing.c"] # typos can't handle "2nd" as a word (yet?) default.extend-ignore-identifiers-re = ["_2nd"] diff --git a/distr/flecs.c b/distr/flecs.c index fab84c71a..a5975bc4f 100644 --- a/distr/flecs.c +++ b/distr/flecs.c @@ -5255,7 +5255,7 @@ bool flecs_expr_is_type_number( #define ECS_VALUE_GET(value, T) (*(T*)(value)->ptr) #define ECS_BOP(left, right, result, op, R, T)\ - ECS_VALUE_GET(result, R) = ECS_VALUE_GET(left, T) op ECS_VALUE_GET(right, T) + ECS_VALUE_GET(result, R) = (R)(ECS_VALUE_GET(left, T) op ECS_VALUE_GET(right, T)) #define ECS_BOP_COND(left, right, result, op, R, T)\ ECS_VALUE_GET(result, ecs_bool_t) = ECS_VALUE_GET(left, T) op ECS_VALUE_GET(right, T) diff --git a/src/addons/script/expr/expr.h b/src/addons/script/expr/expr.h index df92b8381..9f33dd227 100644 --- a/src/addons/script/expr/expr.h +++ b/src/addons/script/expr/expr.h @@ -69,7 +69,7 @@ bool flecs_expr_is_type_number( #define ECS_VALUE_GET(value, T) (*(T*)(value)->ptr) #define ECS_BOP(left, right, result, op, R, T)\ - ECS_VALUE_GET(result, R) = ECS_VALUE_GET(left, T) op ECS_VALUE_GET(right, T) + ECS_VALUE_GET(result, R) = (R)(ECS_VALUE_GET(left, T) op ECS_VALUE_GET(right, T)) #define ECS_BOP_COND(left, right, result, op, R, T)\ ECS_VALUE_GET(result, ecs_bool_t) = ECS_VALUE_GET(left, T) op ECS_VALUE_GET(right, T)