diff --git a/nac3core/src/toplevel/composer.rs b/nac3core/src/toplevel/composer.rs index 50c5344..137f187 100644 --- a/nac3core/src/toplevel/composer.rs +++ b/nac3core/src/toplevel/composer.rs @@ -414,7 +414,14 @@ impl TopLevelComposer { let arg = args[0].1; if ctx.unifier.unioned(arg_ty, boolean) { Some(arg) - } else if ctx.unifier.unioned(arg_ty, int32) || ctx.unifier.unioned(arg_ty, int64) { + } else if ctx.unifier.unioned(arg_ty, int32) { + Some(ctx.builder.build_int_compare( + IntPredicate::NE, + ctx.ctx.i32_type().const_zero(), + arg.into_int_value(), + "bool", + ).into()) + } else if ctx.unifier.unioned(arg_ty, int64) { Some(ctx.builder.build_int_compare( IntPredicate::NE, ctx.ctx.i64_type().const_zero(),