diff options
author | William M. Brack <wbrack@src.gnome.org> | 2009-01-24 03:06:51 +0000 |
---|---|---|
committer | William M. Brack <wbrack@src.gnome.org> | 2009-01-24 03:06:51 +0000 |
commit | cc8f0964b23cf2d656a7d0209904175acd496ca6 (patch) | |
tree | a35a57a5b996be977322af8abbf16be3f669dc41 /libexslt | |
parent | eac88d34bf9d93c433a0e56f9dce0ad68961deda (diff) | |
download | libxslt-cc8f0964b23cf2d656a7d0209904175acd496ca6.tar.gz libxslt-cc8f0964b23cf2d656a7d0209904175acd496ca6.tar.bz2 libxslt-cc8f0964b23cf2d656a7d0209904175acd496ca6.zip |
Fixed indexing error reported by Ron Burk on the mailing list.
* libexslt/strings.c: Fixed indexing error reported by Ron Burk on the mailing list.
svn path=/trunk/; revision=1494
Diffstat (limited to 'libexslt')
-rw-r--r-- | libexslt/strings.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/libexslt/strings.c b/libexslt/strings.c index e4eb3eab..192d0c4a 100644 --- a/libexslt/strings.c +++ b/libexslt/strings.c @@ -589,15 +589,14 @@ exsltStrReplaceFunction (xmlXPathParserContextPtr ctxt, int nargs) { } str = xmlXPathPopString(ctxt); - ret = xmlStrdup(str); + ret = xmlStrdup(str); - for (i = 0; i < searchSet->nodeNr; i++) { - - searchStr = xmlXPathCastNodeToString(searchSet->nodeTab[i]); + for (i = 0; i < searchSet->nodeNr; i++) { + searchStr = xmlXPathCastNodeToString(searchSet->nodeTab[i]); if (replaceSet != NULL) { replaceStr = NULL; - if (i <= replaceSet->nodeNr) { + if (i < replaceSet->nodeNr) { replaceStr = xmlXPathCastNodeToString(replaceSet->nodeTab[i]); } |