--- a/mojoshader_preprocessor.c Mon Feb 09 19:26:29 2009 -0500
+++ b/mojoshader_preprocessor.c Tue Feb 10 10:43:37 2009 -0500
@@ -304,17 +304,16 @@
} // preprocessor_end
-void preprocessor_clearerror(Preprocessor *_ctx)
-{
- Context *ctx = (Context *) _ctx;
- ctx->isfail = 0;
-} // preprocessor_clearerror
-
-
const char *preprocessor_error(Preprocessor *_ctx)
{
Context *ctx = (Context *) _ctx;
- return ctx->isfail ? ctx->failstr : NULL;
+ if (ctx->isfail)
+ {
+ ctx->isfail = 0;
+ return ctx->failstr;
+ } // if
+
+ return NULL;
} // preprocessor_error
@@ -670,7 +669,6 @@
error_count++;
} // else
- preprocessor_clearerror(pp);
continue;
} // if