diff --git a/build.bat b/build.bat index 669a2a6..3df2335 100644 --- a/build.bat +++ b/build.bat @@ -3,8 +3,8 @@ call "..\misc\compile_setup.bat" bld --dont_compile_core cd build -rem core_main.exe rtsgame/main.core -core_main.exe examples/unions.core +core_main.exe rtsgame/main.core +rem core_main.exe examples/unions.core bld --dont_compile_core --link=vendor/raylib/windows/raylibdll.lib rem build\generated_main.exe cd .. diff --git a/core_codegen_c_language.cpp b/core_codegen_c_language.cpp index bfd2bdb..d9b6729 100644 --- a/core_codegen_c_language.cpp +++ b/core_codegen_c_language.cpp @@ -582,7 +582,7 @@ gen_ast(Ast *ast) { CASE(RETURN, Return) { gen("return "); - gen_expr(node->expr); + if (node->expr) gen_expr(node->expr); gen(";"); BREAK(); }