Commit b40bb319 authored by Matteo Bruni's avatar Matteo Bruni Committed by Alexandre Julliard

wpp: Assure if_stack is clean before returning.

parent e9693d62
...@@ -193,9 +193,11 @@ int wpp_parse( const char *input, FILE *output ) ...@@ -193,9 +193,11 @@ int wpp_parse( const char *input, FILE *output )
ret = ppy_parse(); ret = ppy_parse();
/* If there were errors during processing, return an error code */ /* If there were errors during processing, return an error code */
if(!ret && pp_status.state) ret = pp_status.state; if (!ret && pp_status.state) ret = pp_status.state;
if (input) wpp_callbacks->close(pp_status.file); if (input) wpp_callbacks->close(pp_status.file);
/* Clean if_stack, it could remain dirty on errors */
while (pp_get_if_depth()) pp_pop_if();
pp_pop_define_state(); pp_pop_define_state();
return ret; return ret;
} }
......
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