Commit 28fb6a24 authored by Matteo Bruni's avatar Matteo Bruni Committed by Alexandre Julliard

wpp: get_string() now can return NULL, handle it.

parent 9086c59d
...@@ -1514,6 +1514,9 @@ void pp_do_include(char *fname, int type) ...@@ -1514,6 +1514,9 @@ void pp_do_include(char *fname, int type)
int n; int n;
includelogicentry_t *iep; includelogicentry_t *iep;
if(!fname)
return;
for(iep = pp_includelogiclist; iep; iep = iep->next) for(iep = pp_includelogiclist; iep; iep = iep->next)
{ {
if(!strcmp(iep->filename, fname)) if(!strcmp(iep->filename, fname))
......
...@@ -279,16 +279,16 @@ preprocessor ...@@ -279,16 +279,16 @@ preprocessor
| tMACRO res_arg allmargs tMACROEND opt_mtexts tNL { | tMACRO res_arg allmargs tMACROEND opt_mtexts tNL {
pp_add_macro($1, macro_args, nmacro_args, $5); pp_add_macro($1, macro_args, nmacro_args, $5);
} }
| tLINE tSINT tDQSTRING tNL { fprintf(ppy_out, "# %d %s\n", $2 , $3); free($3); } | tLINE tSINT tDQSTRING tNL { if($3) fprintf(ppy_out, "# %d %s\n", $2 , $3); free($3); }
| tGCCLINE tSINT tDQSTRING tNL { fprintf(ppy_out, "# %d %s\n", $2 , $3); free($3); } | tGCCLINE tSINT tDQSTRING tNL { if($3) fprintf(ppy_out, "# %d %s\n", $2 , $3); free($3); }
| tGCCLINE tSINT tDQSTRING tSINT tNL | tGCCLINE tSINT tDQSTRING tSINT tNL
{ fprintf(ppy_out, "# %d %s %d\n", $2, $3, $4); free($3); } { if($3) fprintf(ppy_out, "# %d %s %d\n", $2, $3, $4); free($3); }
| tGCCLINE tSINT tDQSTRING tSINT tSINT tNL | tGCCLINE tSINT tDQSTRING tSINT tSINT tNL
{ fprintf(ppy_out, "# %d %s %d %d\n", $2 ,$3, $4, $5); free($3); } { if($3) fprintf(ppy_out, "# %d %s %d %d\n", $2 ,$3, $4, $5); free($3); }
| tGCCLINE tSINT tDQSTRING tSINT tSINT tSINT tNL | tGCCLINE tSINT tDQSTRING tSINT tSINT tSINT tNL
{ fprintf(ppy_out, "# %d %s %d %d %d\n", $2 ,$3 ,$4 ,$5, $6); free($3); } { if($3) fprintf(ppy_out, "# %d %s %d %d %d\n", $2 ,$3 ,$4 ,$5, $6); free($3); }
| tGCCLINE tSINT tDQSTRING tSINT tSINT tSINT tSINT tNL | tGCCLINE tSINT tDQSTRING tSINT tSINT tSINT tSINT tNL
{ fprintf(ppy_out, "# %d %s %d %d %d %d\n", $2 ,$3 ,$4 ,$5, $6, $7); free($3); } { if($3) fprintf(ppy_out, "# %d %s %d %d %d %d\n", $2 ,$3 ,$4 ,$5, $6, $7); free($3); }
| tGCCLINE tNL /* The null-token */ | tGCCLINE tNL /* The null-token */
| tERROR opt_text tNL { ppy_error("#error directive: '%s'", $2); free($2); } | tERROR opt_text tNL { ppy_error("#error directive: '%s'", $2); free($2); }
| tWARNING opt_text tNL { ppy_warning("#warning directive: '%s'", $2); free($2); } | tWARNING opt_text tNL { ppy_warning("#warning directive: '%s'", $2); free($2); }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment