Navigation Menu

Skip to content

Commit

Permalink
Quick optimization.
Browse files Browse the repository at this point in the history
  • Loading branch information
icculus committed Feb 24, 2009
1 parent d09bcaa commit 30b9edc
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions mojoshader_preprocessor.c
Expand Up @@ -529,6 +529,9 @@ static int push_source(Context *ctx, const char *fname, const char *source,
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;
Expand Down

0 comments on commit 30b9edc

Please sign in to comment.