Skip to content

Commit ac2657c

Browse files
committed
Fixed a bug of 0 arguments on variant function call.
1 parent 85fa7ae commit ac2657c

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

Source/HproseCommon.pas

+10-1
Original file line numberDiff line numberDiff line change
@@ -3130,7 +3130,16 @@ function TVarObjectType.DoFunction(var Dest: TVarData; const V: TVarData;
31303130
var
31313131
Obj: TObject;
31323132
Intf: IInvokeableVarObject;
3133-
begin
3133+
Args: TVarDataArray;
3134+
begin
3135+
if (Length(Arguments) = 1) and
3136+
(Arguments[0].VType = varError) and
3137+
(Arguments[0].VError = -2147352572) // Parameter not found.
3138+
then begin
3139+
SetLength(Args, 0);
3140+
Result := DoFunction(Dest, V, Name, Args);
3141+
Exit;
3142+
end;
31343143
Obj := GetInstance(V);
31353144
Result := True;
31363145
if AnsiSameText(Name, 'Free') and (Length(Arguments) = 0) then

0 commit comments

Comments
 (0)