lazutils: compwriterpas: fixed writing bytebool

git-svn-id: trunk@57646 -
This commit is contained in:
mattias 2018-04-12 19:32:19 +00:00
parent c4d77663b1
commit d43000198c

View File

@ -619,11 +619,17 @@ begin
WriteAssign(PropName,Ident)
else begin
// Integer has to be written just as number
aTypeData:=GetTypeData(PropInfo^.PropType);
if aTypeData^.MinValue>=0 then
WriteAssign(PropName,IntToStr(longword(Int32Value)))
case PropType^.Name of
'ByteBool': WriteAssign(PropName,GetBoolLiteral(ByteBool(Int32Value)));
'WordBool': WriteAssign(PropName,GetBoolLiteral(WordBool(Int32Value)));
'LongBool': WriteAssign(PropName,GetBoolLiteral(LongBool(Int32Value)));
else
WriteAssign(PropName,IntToStr(Int32Value));
aTypeData:=GetTypeData(PropInfo^.PropType);
if aTypeData^.MinValue>=0 then
WriteAssign(PropName,IntToStr(longword(Int32Value)))
else
WriteAssign(PropName,IntToStr(Int32Value));
end;
end;
end;
tkChar: