* add checks for filedef type to prevent crashes

This commit is contained in:
peter 2004-11-21 21:27:31 +00:00
parent ac471f1b98
commit 9a64d34d34

View File

@ -461,6 +461,7 @@ implementation
if is_typed then if is_typed then
begin begin
{ add the typesize to the filepara } { add the typesize to the filepara }
if filepara.resulttype.def.deftype=filedef then
filepara.right := ccallparanode.create(cordconstnode.create( filepara.right := ccallparanode.create(cordconstnode.create(
tfiledef(filepara.resulttype.def).typedfiletype.def.size,s32inttype,true),nil); tfiledef(filepara.resulttype.def).typedfiletype.def.size,s32inttype,true),nil);
@ -489,6 +490,7 @@ implementation
para.left:=p1; para.left:=p1;
end; end;
if filepara.resulttype.def.deftype=filedef then
inserttypeconv(para.left,tfiledef(filepara.resulttype.def).typedfiletype); inserttypeconv(para.left,tfiledef(filepara.resulttype.def).typedfiletype);
if assigned(para.right) and if assigned(para.right) and
@ -2463,7 +2465,10 @@ begin
end. end.
{ {
$Log$ $Log$
Revision 1.153 2004-11-21 17:54:59 peter Revision 1.154 2004-11-21 21:27:31 peter
* add checks for filedef type to prevent crashes
Revision 1.153 2004/11/21 17:54:59 peter
* ttempcreatenode.create_reg merged into .create with parameter * ttempcreatenode.create_reg merged into .create with parameter
whether a register is allowed whether a register is allowed
* funcret_paraloc renamed to funcretloc * funcret_paraloc renamed to funcretloc