summaryrefslogtreecommitdiffstats
path: root/src/dom/xpathparser.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/dom/xpathparser.cpp')
-rw-r--r--src/dom/xpathparser.cpp16
1 files changed, 9 insertions, 7 deletions
diff --git a/src/dom/xpathparser.cpp b/src/dom/xpathparser.cpp
index f0e929687..393c12cda 100644
--- a/src/dom/xpathparser.cpp
+++ b/src/dom/xpathparser.cpp
@@ -228,16 +228,16 @@ int XPathParser::getNumber(int p0, double &dresult)
{
int p = p0;
if (p >= parselen)
+ {
return p0;/*need at least x*/
-
+ }
+
bool isdouble = false;
- bool negative = false;
int ch = parsebuf[p];
if (ch=='-')
{
p++;
- negative = true;
if (p >= parselen) return p0;
}
@@ -1189,18 +1189,20 @@ int XPathParser::getFunctionCall(int p0, int depth)
int p = p0;
if (lexTokType(p) != FUNCTION_NAME)
+ {
return p0;
-
+ }
+
DOMString name = lexTok(p).getStringValue();
p++;
if (lexTokType(p) != LPAREN) //this makes a function
+ {
return p0;
+ }
p++;
- int argCount = 0;
-
int p2 = getArgument(p, depth+1);
if (p2 < 0)
{
@@ -1209,7 +1211,7 @@ int XPathParser::getFunctionCall(int p0, int depth)
}
if (p2 > p)
{
- argCount++;
+ int argCount = 1;
p = p2;
while (lexTokType(p) == COMMA)
{