[sword-cvs] sword/src/utilfuns utilxml.cpp,1.6,1.7
sword@www.crosswire.org
sword@www.crosswire.org
Wed, 25 Jun 2003 15:09:17 -0700
Update of /usr/local/cvsroot/sword/src/utilfuns
In directory www:/tmp/cvs-serv25077/src/utilfuns
Modified Files:
utilxml.cpp
Log Message:
Fixed bug in XMLTag where isEmpty was not raised if no space before / like <p/>
Index: utilxml.cpp
===================================================================
RCS file: /usr/local/cvsroot/sword/src/utilfuns/utilxml.cpp,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** utilxml.cpp 19 Jun 2003 16:58:30 -0000 1.6
--- utilxml.cpp 25 Jun 2003 22:09:15 -0000 1.7
***************
*** 76,79 ****
--- 76,81 ----
int start = 0;
int i;
+
+ // skip beginning silliness
for (i = 0; ((tagString[i]) && (!isalpha(tagString[i]))); i++) {
if (tagString[i] == '/')
***************
*** 88,91 ****
--- 90,95 ----
strncpy(name, tagString+start, i-start);
name[i-start] = 0;
+ if (tagString[i] == '/')
+ empty = true;
}
}