Print out "void" instead of "(null)" when printing out AST.
authorRyan C. Gordon <icculus@icculus.org>
Tue, 21 Sep 2010 02:06:57 -0400
changeset 915 55b583afec46
parent 913 483458775ec5
child 916 3738cd265707
Print out "void" instead of "(null)" when printing out AST.
mojoshader_compiler.c
--- a/mojoshader_compiler.c	Mon May 31 22:15:34 2010 -0400
+++ b/mojoshader_compiler.c	Tue Sep 21 02:06:57 2010 -0400
@@ -2009,7 +2009,9 @@
                 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(")");