mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-09-30 11:39:32 +02:00
* Fixed bug #12323. Bug is in getting default value of string parameters, unterminated memory copy
git-svn-id: trunk@11870 -
This commit is contained in:
parent
213f8a41c7
commit
b40d826439
@ -2805,7 +2805,13 @@ implementation
|
||||
case hpc.consttyp of
|
||||
conststring,
|
||||
constresourcestring :
|
||||
hs:=strpas(pchar(hpc.value.valueptr));
|
||||
begin
|
||||
If hpc.value.len>0 then
|
||||
begin
|
||||
setLength(hs,hpc.value.len);
|
||||
move(hpc.value.valueptr^,hs[1],hpc.value.len);
|
||||
end;
|
||||
end;
|
||||
constreal :
|
||||
str(pbestreal(hpc.value.valueptr)^,hs);
|
||||
constpointer :
|
||||
|
Loading…
Reference in New Issue
Block a user