[PATCH] bug in xml-io.c



I found a tiny little bug in the xml file-loading code. I saw this
little buglet when I was stealing code to load canvas items from
xml. 

I think it would be nice if that code could be extracted and put in
gnome-xml or somewhere else to make it a quick and easy task to use xml
in our applications. It's basically the xmlGet* functions I'm talking
about. They are not hard to do yourself but kind of repetitive and
boring and prone to errors. And if put in a lib, we could add more
standardized stuff, all the canvas items for example, and maybe more
things that I'm not aware of.

Or maybe I'm just lazy ;)

Richard

Index: xml-io.c
===================================================================
RCS file: /cvs/gnome/gnumeric/src/xml-io.c,v
retrieving revision 1.32
diff -u -r1.32 xml-io.c
--- xml-io.c	1999/01/10 23:34:02	1.32
+++ xml-io.c	1999/03/13 17:20:39
@@ -227,7 +227,7 @@
 	float coord[20];	/* TODO: must be dynamic !!!! */
 
 	val = xmlGetValue (node, name);
-	if (ret == NULL) return(NULL);
+	if (val == NULL) return(NULL);
 	ptr = val;
 	do {
 		while ((*ptr) && (*ptr != '('))


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]