remove a warning on Solaris fix a crashing bug #151111 Daniel
* parser.c: remove a warning on Solaris
* xmlschemastype.c: fix a crashing bug #151111
Daniel
diff --git a/xmlschemastypes.c b/xmlschemastypes.c
index f46b03c..e867054 100644
--- a/xmlschemastypes.c
+++ b/xmlschemastypes.c
@@ -1733,6 +1733,13 @@
if (type == NULL)
return (-1);
+ /*
+ * validating a non existant text node is similar to validating
+ * an empty one.
+ */
+ if (value == NULL)
+ value = BAD_CAST "";
+
if (val != NULL)
*val = NULL;
if ((flags == 0) && (value != NULL)) {
@@ -2297,7 +2304,7 @@
xmlChar *base;
int total, i = 0;
- if (cur == NULL)
+ if ((cur == NULL) || (*cur == 0))
goto return1;
while (((*cur >= '0') && (*cur <= '9')) ||