소스 검색

minor cleanup to the parsing loop

Lee Thomason 14 년 전
부모
커밋
9708885e5e
1개의 변경된 파일1개의 추가작업 그리고 2개의 파일을 삭제
  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) == '>' ) {