Catch these tokens in the compiler, for badly-formed preprocessor source code.
--- a/mojoshader_compiler.c Wed Feb 24 21:23:58 2010 -0500
+++ b/mojoshader_compiler.c Thu Feb 25 02:25:42 2010 -0500
@@ -2461,6 +2461,9 @@
fname = preprocessor_sourcepos(pp, &ctx->sourceline);
ctx->sourcefile = fname ? stringcache(ctx->strcache, fname) : 0;
+ if ((tokenval == TOKEN_HASH) || (tokenval == TOKEN_HASHHASH))
+ tokenval = TOKEN_BAD_CHARS;
+
if (tokenval == TOKEN_BAD_CHARS)
{
fail(ctx, "Bad characters in source file");