mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-28 16:40:28 +02:00
* made resultype_char_to_char a little bit robuster
This commit is contained in:
parent
b9cb031a39
commit
f56c9c6855
@ -457,20 +457,24 @@ implementation
|
||||
hp : tordconstnode;
|
||||
begin
|
||||
result:=nil;
|
||||
if torddef(resulttype.def).typ=uchar then
|
||||
if (torddef(resulttype.def).typ=uchar) and
|
||||
(torddef(left.resulttype.def).typ=uwidechar) then
|
||||
begin
|
||||
hp:=cordconstnode.create(
|
||||
ord(unicode2asciichar(tcompilerwidechar(tordconstnode(left).value))),cchartype);
|
||||
resulttypepass(hp);
|
||||
result:=hp;
|
||||
end
|
||||
else
|
||||
else if (torddef(resulttype.def).typ=uwidechar) and
|
||||
(torddef(left.resulttype.def).typ=uchar) then
|
||||
begin
|
||||
hp:=cordconstnode.create(
|
||||
asciichar2unicode(chr(tordconstnode(left).value)),cwidechartype);
|
||||
resulttypepass(hp);
|
||||
result:=hp;
|
||||
end;
|
||||
end
|
||||
else
|
||||
internalerror(200105131);
|
||||
end;
|
||||
|
||||
|
||||
@ -1363,7 +1367,10 @@ begin
|
||||
end.
|
||||
{
|
||||
$Log$
|
||||
Revision 1.27 2001-05-08 21:06:30 florian
|
||||
Revision 1.28 2001-05-13 15:43:46 florian
|
||||
* made resultype_char_to_char a little bit robuster
|
||||
|
||||
Revision 1.27 2001/05/08 21:06:30 florian
|
||||
* some more support for widechars commited especially
|
||||
regarding type casting and constants
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user