|
@@ -1063,7 +1063,7 @@ bool cmXmlNodeHasChild( const cmXmlNode_t* np, const cmChar_t* label, ... )
|
1063
|
1063
|
bool _cmXmlNodeHasChildWithAttrAndValueV( const cmXmlNode_t* np, const cmChar_t* label, va_list vl0, bool valueFl )
|
1064
|
1064
|
{
|
1065
|
1065
|
unsigned argN = _cmXmlLabelCount(label,vl0);
|
1066
|
|
- unsigned n = valueFl ? 2 : 1;
|
|
1066
|
+ unsigned n = valueFl ? 2 : 1;
|
1067
|
1067
|
va_list vl1;
|
1068
|
1068
|
unsigned i;
|
1069
|
1069
|
|
|
@@ -1072,15 +1072,17 @@ bool _cmXmlNodeHasChildWithAttrAndValueV( const cmXmlNode_t* np, const cmChar
|
1072
|
1072
|
if( argN <= n-1 )
|
1073
|
1073
|
return false;
|
1074
|
1074
|
|
|
1075
|
+ argN -= n;
|
|
1076
|
+
|
1075
|
1077
|
va_copy(vl1,vl0);
|
1076
|
|
- np = _cmXmlNodeHasChildV(np,label,vl1,argN-1);
|
|
1078
|
+ np = _cmXmlNodeHasChildV(np,label,vl1,argN);
|
1077
|
1079
|
va_end(vl1);
|
1078
|
1080
|
|
1079
|
1081
|
if( np == NULL )
|
1080
|
1082
|
return false;
|
1081
|
|
-
|
|
1083
|
+
|
1082
|
1084
|
// advance vl0 to the attribute label
|
1083
|
|
- for(i=0; i<argN-1; ++i)
|
|
1085
|
+ for(i=1; i<argN; ++i)
|
1084
|
1086
|
{
|
1085
|
1087
|
label = va_arg(vl0,const cmChar_t*);
|
1086
|
1088
|
assert( label != NULL );
|