diff options
Diffstat (limited to 'libxslt')
-rw-r--r-- | libxslt/functions.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libxslt/functions.c b/libxslt/functions.c index 9706a7af..5f657807 100644 --- a/libxslt/functions.c +++ b/libxslt/functions.c @@ -449,13 +449,13 @@ xsltKeyFunction(xmlXPathParserContextPtr ctxt, int nargs){ */ valuePush(ctxt, obj2); xmlXPathStringFunction(ctxt, 1); - if ((ctxt->value == NULL) || (ctxt->value->type != XPATH_STRING)) { + obj2 = valuePop(ctxt); + if ((obj2 == NULL) || (obj2->type != XPATH_STRING)) { xsltTransformError(tctxt, NULL, tctxt->inst, "key() : invalid arg expecting a string\n"); ctxt->error = XPATH_INVALID_TYPE; goto error; } - obj2 = valuePop(ctxt); value = obj2->stringval; /* |