Update of /cvsroot/monetdb/MonetDB5/src/modules/mal
In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv11339/src/modules/mal
Modified Files:
batxml.mx
Log Message:
fix bug in handling xml elements with out pcdata
Index: batxml.mx
===================================================================
RCS file: /cvsroot/monetdb/MonetDB5/src/modules/mal/batxml.mx,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -d -r1.21 -r1.22
--- batxml.mx 10 Oct 2007 12:14:51 -0000 1.21
+++ batxml.mx 5 Jan 2008 11:36:05 -0000 1.22
@@ -576,7 +576,6 @@
/* include attributes */
if( attributes) {
-
if( (len=strlen(t)) >= size){
buf= GDKrealloc(buf,len+strlen(*name)+BUFSIZ);
size= len+strlen(*name)+BUFSIZ;
@@ -587,14 +586,14 @@
elm= offset= strlen(buf);
/* fetch the elements */
-
if( (len=strlen(t)+elm) >= size-offset){
buf= GDKrealloc(buf,size+2*elm);
size= len+2*elm;
}
- snprintf(buf+offset,size-offset,"%s",t);
- offset+= strlen(buf+offset);
-
+ if (!strNil(t)) {
+ snprintf(buf+offset,size-offset,"%s",t);
+ offset+= strlen(buf+offset);
+ }
snprintf(buf + offset,size-offset, "</%s>\n",*name);
bunfastins(bn,h,buf);
}
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Monetdb-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/monetdb-checkins