mirror of
https://github.com/byteworksinc/ORCA-C.git
synced 2025-01-21 06:30:41 +00:00
Avoid null pointer dereferences when generating code for initializers.
These should have been harmless under ORCA/Pascal on the IIgs, assuming the code is otherwise functioning properly.
This commit is contained in:
parent
2190b7e7ed
commit
095060ca70
14
Parser.pas
14
Parser.pas
@ -3971,7 +3971,8 @@ var
|
||||
count := count - long(elements).lsw;
|
||||
if count = 0 then begin
|
||||
iPtr := iPtr^.next;
|
||||
count := iPtr^.count;
|
||||
if iPtr <> nil then
|
||||
count := iPtr^.count;
|
||||
end; {if}
|
||||
end {if}
|
||||
else begin
|
||||
@ -3981,7 +3982,8 @@ var
|
||||
count := count-1;
|
||||
if count = 0 then begin
|
||||
iPtr := iPtr^.next;
|
||||
count := iPtr^.count;
|
||||
if iPtr <> nil then
|
||||
count := iPtr^.count;
|
||||
end; {if}
|
||||
end; {if}
|
||||
disp := disp+itype^.size;
|
||||
@ -4043,9 +4045,11 @@ var
|
||||
count := count-1;
|
||||
if count = 0 then begin
|
||||
iPtr := iPtr^.next;
|
||||
count := iPtr^.count;
|
||||
bitsize := iPtr^.bitsize;
|
||||
bitdisp := iPtr^.bitdisp;
|
||||
if iPtr <> nil then begin
|
||||
count := iPtr^.count;
|
||||
bitsize := iPtr^.bitsize;
|
||||
bitdisp := iPtr^.bitdisp;
|
||||
end; {if}
|
||||
end; {if}
|
||||
end; {if}
|
||||
if union then
|
||||
|
Loading…
x
Reference in New Issue
Block a user