Преглед изворни кода

Return xmlChar (unsigned char) as char

The libxml2 library has a type xmlChar. It's a typedef'ed unsigned char.
I don't know why libxml2 use unsigned char * for strings instead of
char *. Return converted xmlChar as (char *).
Serj Kalichev пре 12 година
родитељ
комит
c44303616f
1 измењених фајлова са 1 додато и 1 уклоњено
  1. 1 1
      clish/shell/shell_libxml2.c

+ 1 - 1
clish/shell/shell_libxml2.c

@@ -166,7 +166,7 @@ char *clish_xmlnode_fetch_attr(clish_xmlnode_t *node,
 		while (a) {
 			if (strcmp((char*)a->name, attrname) == 0) {
 				if (a->children && a->children->content)
-					return a->children->content;
+					return (char *)a->children->content;
 				else
 					return NULL;
 			}