From 600915251907210bb57938c5285f4eaa5380ea6c Mon Sep 17 00:00:00 2001 From: "Ryan C. Gordon" Date: Tue, 21 Sep 2010 02:06:57 -0400 Subject: [PATCH] Print out "void" instead of "(null)" when printing out AST. --- mojoshader_compiler.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/mojoshader_compiler.c b/mojoshader_compiler.c index 1cc0c190..0bd2478b 100644 --- a/mojoshader_compiler.c +++ b/mojoshader_compiler.c @@ -2009,7 +2009,9 @@ static void print_ast(void *ast) case FNSTORECLS_NONE: break; case FNSTORECLS_INLINE: printf("inline "); break; } // switch - printf("%s %s(", ((FunctionSignature *) ast)->datatype, + printf("%s %s(", + ((FunctionSignature *) ast)->datatype ? + ((FunctionSignature *) ast)->datatype : "void", ((FunctionSignature *) ast)->identifier); print_ast(((FunctionSignature *) ast)->args); printf(")");