Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 6 additions & 5 deletions OtlTaskControl.pas
Original file line number Diff line number Diff line change
Expand Up @@ -2555,7 +2555,7 @@ procedure TOmniTaskExecutor.GetMethodAddrAndSignature(const methodName: string;
const
CShortLen = SizeOf(ShortString) - 1;
var
headerEnd : cardinal;
headerEnd : NativeUInt;
methodInfoHeader: PMethodInfoHeader;
paramNum : integer;
params : PParamInfo;
Expand Down Expand Up @@ -2618,14 +2618,15 @@ procedure TOmniTaskExecutor.GetMethodAddrAndSignature(const methodName: string;
[WorkerIntf.Implementor.ClassName, methodName]);
// only limited subset of method signatures is allowed:
// (Self), (Self, const TOmniValue), (Self, var TObject)
headerEnd := cardinal(methodInfoHeader) + methodInfoHeader^.Len;
returnInfo := PReturnInfo(cardinal(methodInfoHeader) + SizeOf(methodInfoHeader^)
headerEnd := NativeUInt(methodInfoHeader) + methodInfoHeader^.Len;
returnInfo := PReturnInfo(NativeUInt(methodInfoHeader) + SizeOf(methodInfoHeader^)
- CShortLen + Length(methodInfoHeader^.Name));
params := PParamInfo(cardinal(returnInfo) + SizeOf(TReturnInfo));
params := PParamInfo(NativeUInt(returnInfo) + SizeOf(TReturnInfo));
paramNum := 0;
methodSignature := itUnknown;
// Loop over the parameters
while (cardinal(params) < headerEnd) do begin

while (NativeUInt(params) < headerEnd) do begin
{$IFDEF OTL_KnowsParamCount}
if paramNum >= returnInfo.ParamCount then
break; //while
Expand Down
Loading