[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]
[xml] Little bug in UnaryExpr
- From: "Tom ." <ptittom free fr>
- To: xml gnome org
- Subject: [xml] Little bug in UnaryExpr
- Date: Mon, 12 Mar 2001 18:51:44 +0100
Hi,
libxml rejects expressions such as '- - 17' whereas the XPath Rec says they
are valid expressions:
[27] UnaryExpr ::= UnionExpr
| '-' UnaryExpr
The attached patch should fix the problem (2 minor changes in
xmlXPathEvalUnaryExpr, not tested).
Tom.
--- src/xpath.c Mon Mar 12 18:46:41 2001
+++ dev/xpath.c Mon Mar 12 18:49:10 2001
@@ -5630,8 +5630,8 @@
int minus = 0;
SKIP_BLANKS;
- if (CUR == '-') {
- minus = 1;
+ while (CUR == '-') {
+ minus = 1 - minus;
NEXT;
SKIP_BLANKS;
}
[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]