Fix a bug in makeAction
* upnp/src/api/upnptools.c: Avoid extra call to va_arg after consuming all arguments. git-svn-id: https://pupnp.svn.sourceforge.net/svnroot/pupnp/trunk@161 119443c7-1b9e-41f8-b6fc-b9c35fce742c
This commit is contained in:
@@ -298,7 +298,7 @@ makeAction( IN int response,
|
||||
if( NumArg > 0 ) {
|
||||
//va_start(ArgList, Arg);
|
||||
ArgName = Arg;
|
||||
while( Idx++ != NumArg ) {
|
||||
for(;;;) {
|
||||
ArgValue = va_arg( ArgList, const char * );
|
||||
|
||||
if( ArgName != NULL ) {
|
||||
@@ -313,6 +313,10 @@ makeAction( IN int response,
|
||||
ixmlNode_appendChild( node, ( IXML_Node * ) Ele );
|
||||
}
|
||||
|
||||
if ( ++Idx == NumArg ) {
|
||||
break;
|
||||
}
|
||||
|
||||
ArgName = va_arg( ArgList, const char * );
|
||||
}
|
||||
//va_end(ArgList);
|
||||
|
Reference in New Issue
Block a user