mojoshader_preprocessor.c
changeset 698 a6cd16b3e270
parent 693 0cdfff18820c
child 699 c2f50b391d96
--- a/mojoshader_preprocessor.c	Tue Feb 24 02:04:05 2009 -0500
+++ b/mojoshader_preprocessor.c	Tue Feb 24 02:57:47 2009 -0500
@@ -529,6 +529,9 @@
                        unsigned int srclen, unsigned int linenum,
                        MOJOSHADER_includeClose close_callback, Define *defs)
 {
+    if (srclen == 0)
+        return 1;  // nothing to do: just pretend you did it.
+
     IncludeState *state = get_include(ctx);
     if (state == NULL)
         return 0;