mojoshader_preprocessor.c
changeset 698 a6cd16b3e270
parent 693 0cdfff18820c
child 699 c2f50b391d96
equal deleted inserted replaced
697:765a85a989a2 698:a6cd16b3e270
   527 
   527 
   528 static int push_source(Context *ctx, const char *fname, const char *source,
   528 static int push_source(Context *ctx, const char *fname, const char *source,
   529                        unsigned int srclen, unsigned int linenum,
   529                        unsigned int srclen, unsigned int linenum,
   530                        MOJOSHADER_includeClose close_callback, Define *defs)
   530                        MOJOSHADER_includeClose close_callback, Define *defs)
   531 {
   531 {
       
   532     if (srclen == 0)
       
   533         return 1;  // nothing to do: just pretend you did it.
       
   534 
   532     IncludeState *state = get_include(ctx);
   535     IncludeState *state = get_include(ctx);
   533     if (state == NULL)
   536     if (state == NULL)
   534         return 0;
   537         return 0;
   535 
   538 
   536     if (fname != NULL)
   539     if (fname != NULL)