diff --git a/tinyxmlparser.cpp b/tinyxmlparser.cpp index 9ea52ef..b0431e2 100644 --- a/tinyxmlparser.cpp +++ b/tinyxmlparser.cpp @@ -354,7 +354,7 @@ const char* TiXmlBase::SkipWhiteSpace( const char* p, TiXmlEncoding encoding ) } else { - while ( *p && IsWhiteSpace( *p ) || *p == '\n' || *p =='\r' ) + while ( *p && (IsWhiteSpace( *p ) || *p == '\n' || *p =='\r') ) ++p; } diff --git a/xpath_processor.cpp b/xpath_processor.cpp index d8d3f81..39b5b7e 100644 --- a/xpath_processor.cpp +++ b/xpath_processor.cpp @@ -1571,10 +1571,12 @@ void xpath_processor::v_function_name ( { nsp_set = erpp_arg [0] -> nsp_get_node_set (); if (nsp_set -> u_get_nb_node_in_set ()) + { if (nsp_set -> o_is_attrib (0)) S_res = nsp_set -> XAp_get_attribute_in_set (0) -> Name (); else S_res = nsp_set -> XNp_get_node_in_set (0) -> Value (); + } } break; default :