mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-09-01 14:10:32 +02:00
* Create proper unicode string for single char if in unicode rtl
This commit is contained in:
parent
61bf79c0ac
commit
b5e2003392
@ -1339,10 +1339,20 @@ implementation
|
|||||||
begin
|
begin
|
||||||
if is_constcharnode(p) then
|
if is_constcharnode(p) then
|
||||||
begin
|
begin
|
||||||
getmem(sp,2);
|
if not is_systemunit_unicode then
|
||||||
sp[0]:=chr(tordconstnode(p).value.svalue);
|
begin
|
||||||
sp[1]:=#0;
|
getmem(sp,2);
|
||||||
sym:=cconstsym.create_string(orgname,constresourcestring,sp,1,nil);
|
sp[0]:=chr(tordconstnode(p).value.svalue);
|
||||||
|
sp[1]:=#0;
|
||||||
|
sym:=cconstsym.create_string(orgname,constresourcestring,sp,1,nil);
|
||||||
|
end
|
||||||
|
else
|
||||||
|
begin
|
||||||
|
initwidestring(pw);
|
||||||
|
setlengthwidestring(pw,1);
|
||||||
|
pw^.data^:=tordconstnode(p).value.svalue;
|
||||||
|
sym:=cconstsym.create_wstring(orgname,constwresourcestring,pw);
|
||||||
|
end;
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
Message(parser_e_illegal_expression);
|
Message(parser_e_illegal_expression);
|
||||||
|
Loading…
Reference in New Issue
Block a user