Skip to content

Commit

Permalink
Fixed a bug of 0 arguments on variant function call.
Browse files Browse the repository at this point in the history
  • Loading branch information
andot committed Jun 7, 2015
1 parent 85fa7ae commit ac2657c
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion Source/HproseCommon.pas
Original file line number Diff line number Diff line change
Expand Up @@ -3130,7 +3130,16 @@ function TVarObjectType.DoFunction(var Dest: TVarData; const V: TVarData;
var
Obj: TObject;
Intf: IInvokeableVarObject;
begin
Args: TVarDataArray;
begin
if (Length(Arguments) = 1) and
(Arguments[0].VType = varError) and
(Arguments[0].VError = -2147352572) // Parameter not found.
then begin
SetLength(Args, 0);
Result := DoFunction(Dest, V, Name, Args);
Exit;
end;
Obj := GetInstance(V);
Result := True;
if AnsiSameText(Name, 'Free') and (Length(Arguments) = 0) then
Expand Down

0 comments on commit ac2657c

Please sign in to comment.