Explorar o código

minor cleanup to the parsing loop

Lee Thomason %!s(int64=14) %!d(string=hai) anos
pai
achega
9708885e5e
Modificáronse 1 ficheiros con 1 adicións e 2 borrados
  1. 1 2
      tinyxml2.cpp

+ 1 - 2
tinyxml2.cpp

@@ -1169,12 +1169,11 @@ char* XMLElement::ParseAttributes( char* p )
 			// now, may reconsider in the future.
 			if ( prevAttribute ) { 
 				prevAttribute->next = attrib;
-				prevAttribute = attrib;
 			}
 			else {
 				rootAttribute = attrib;
-				prevAttribute = rootAttribute;
 			}	
+			prevAttribute = attrib;
 		}
 		// end of the tag
 		else if ( *p == '/' && *(p+1) == '>' ) {