Explorar o código

jsonrpcs: fix handling the optional param spec on no more params

Daniel-Constantin Mierla %!s(int64=8) %!d(string=hai) anos
pai
achega
87d71619e7
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      src/modules/jsonrpcs/jsonrpcs_mod.c

+ 1 - 1
src/modules/jsonrpcs/jsonrpcs_mod.c

@@ -649,7 +649,7 @@ static int jsonrpc_scan(jsonrpc_ctx_t* ctx, char* fmt, ...)
 		ctx->req_node = ctx->req_node->next;
 	}
 	/* error if there is still a scan char type and it is not optional */
-	if(*fmt && mandatory_param==1)
+	if(*fmt && *fmt!='*' && mandatory_param==1)
 		goto error;
 
 	va_end(ap);