projects
/
citadel.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
716dc48
)
SUBST: free the sub-context also if we have a negative conditional.
author
Wilfried Goesgens
<dothebart@citadel.org>
Sat, 27 Oct 2012 18:34:05 +0000
(20:34 +0200)
committer
Wilfried Goesgens
<dothebart@citadel.org>
Sat, 27 Oct 2012 18:34:05 +0000
(20:34 +0200)
webcit/subst.c
patch
|
blob
|
history
diff --git
a/webcit/subst.c
b/webcit/subst.c
index 95e7d47a9746c935f1bb1bc5d7a54dc15e72d834..6f85d04cd28b0bfca2d53aded61cf200af144732 100644
(file)
--- a/
webcit/subst.c
+++ b/
webcit/subst.c
@@
-1851,7
+1851,7
@@
const StrBuf *ProcessTemplate(WCTemplate *Tmpl, StrBuf *Target, WCTemplputParams
else if (TokenRc < 0)
{
if ((TPtr != &TP) &&
- (TPtr->ExitCTXID == TokenRc))
+ (TPtr->ExitCTXID ==
-
TokenRc))
{
UnStackDynamicContext(Target, &TPtr);
}
@@
-1872,10
+1872,15
@@
const StrBuf *ProcessTemplate(WCTemplate *Tmpl, StrBuf *Target, WCTemplputParams
pTmpl->Tokens[i]->Flags,
TokenRc,
&TPtr);
- if (
rc == -
TokenRc)
+ if (
-rc ==
TokenRc)
{
TokenRc = 0;
state = eNext;
+ if ((TPtr != &TP) &&
+ (TPtr->ExitCTXID == - rc))
+ {
+ UnStackDynamicContext(Target, &TPtr);
+ }
}
}
}