[libxslt] Fix popping of vars in xsltCompilerNodePop



commit 3328b50bd73c91cefa5a4df5697ddf21dd20d60e
Author: Nick Wellnhofer <wellnhofer aevum de>
Date:   Mon Nov 8 10:49:32 2010 +0100

    Fix popping of vars in xsltCompilerNodePop
    
    Fix an off by one bug in Var pop-up in the compiler

 libxslt/xslt.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/libxslt/xslt.c b/libxslt/xslt.c
index dd58f81..8e8c414 100644
--- a/libxslt/xslt.c
+++ b/libxslt/xslt.c
@@ -2437,13 +2437,13 @@ xsltCompilerNodePop(xsltCompilerCtxtPtr cctxt, xmlNodePtr node)
 	"xsltCompilerNodePop: Depth mismatch.\n");
 	goto mismatch;
     }
+    cctxt->depth--;
     /*
     * Pop information of variables.
     */
     if ((cctxt->ivar) && (cctxt->ivar->depth > cctxt->depth))
 	xsltCompilerVarInfoPop(cctxt);
 
-    cctxt->depth--;
     cctxt->inode = cctxt->inode->prev;
     if (cctxt->inode != NULL)
 	cctxt->inode->curChildType = 0;



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]