comobj: for loop to ArgCount - 1 causes a crash when ArgCount = 0 because it is unsigned

git-svn-id: trunk@14743 -
This commit is contained in:
paul 2010-01-19 07:16:37 +00:00
parent 75e702c2e8
commit 9f7a69627a

View File

@ -1346,6 +1346,7 @@ HKCR
GetMem(Arguments,desc^.calldesc.argcount*sizeof(TVarData)); GetMem(Arguments,desc^.calldesc.argcount*sizeof(TVarData));
{ prepare parameters } { prepare parameters }
if desc^.CallDesc.ArgCount > 0 then
for i:=0 to desc^.CallDesc.ArgCount-1 do for i:=0 to desc^.CallDesc.ArgCount-1 do
begin begin
{$ifdef DEBUG_DISPATCH} {$ifdef DEBUG_DISPATCH}