Matteo Bruni : wpp: Assure if_stack is clean before returning.
Alexandre Julliard
julliard at winehq.org
Fri Feb 5 08:42:30 CST 2010
Module: wine
Branch: master
Commit: b40bb31995b70a9bf88f194deac34084c16a4c86
URL: http://source.winehq.org/git/wine.git/?a=commit;h=b40bb31995b70a9bf88f194deac34084c16a4c86
Author: Matteo Bruni <matteo.mystral at gmail.com>
Date: Thu Feb 4 18:56:52 2010 +0100
wpp: Assure if_stack is clean before returning.
---
libs/wpp/wpp.c | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/libs/wpp/wpp.c b/libs/wpp/wpp.c
index 47989f1..de4286f 100644
--- a/libs/wpp/wpp.c
+++ b/libs/wpp/wpp.c
@@ -193,9 +193,11 @@ int wpp_parse( const char *input, FILE *output )
ret = ppy_parse();
/* 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);
+ /* Clean if_stack, it could remain dirty on errors */
+ while (pp_get_if_depth()) pp_pop_if();
pp_pop_define_state();
return ret;
}
More information about the wine-cvs
mailing list