mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-17 03:39:28 +02:00
* Fixed for 9879
git-svn-id: trunk@8760 -
This commit is contained in:
parent
0021d0f27b
commit
a19b22c48f
@ -352,19 +352,23 @@ begin
|
||||
begin
|
||||
Node[SType]:=IntToStr(Ord(DataType));
|
||||
DataNode:=Node.FirstChild;
|
||||
Case DataType of
|
||||
dtDWORD : DataNode.NodeValue:=IntToStr(PCardinal(@Data)^);
|
||||
dtString : begin
|
||||
SetLength(S,DataSize);
|
||||
If (DataSize>0) then
|
||||
Move(Data,S[1],DataSize);
|
||||
DataNode.NodeValue:=S;
|
||||
end;
|
||||
dtBinary : begin
|
||||
S:=BufToHex(Data,DataSize);
|
||||
DataNode.NodeValue:=S;
|
||||
end;
|
||||
end;
|
||||
Result:=DataNode<>Nil; // Bug 9879. Create child here?
|
||||
If Result Then
|
||||
begin
|
||||
Case DataType of
|
||||
dtDWORD : DataNode.NodeValue:=IntToStr(PCardinal(@Data)^);
|
||||
dtString : begin
|
||||
SetLength(S,DataSize);
|
||||
If (DataSize>0) then
|
||||
Move(Data,S[1],DataSize);
|
||||
DataNode.NodeValue:=S;
|
||||
end;
|
||||
dtBinary : begin
|
||||
S:=BufToHex(Data,DataSize);
|
||||
DataNode.NodeValue:=S;
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
If Result then
|
||||
begin
|
||||
@ -711,11 +715,12 @@ Var
|
||||
|
||||
begin
|
||||
N:=FindValueKey(OldName);
|
||||
If (N<>Nil) then
|
||||
result:=n<>nil;
|
||||
If (Result) then
|
||||
begin
|
||||
N[SName]:=NewName;
|
||||
FDirty:=True;
|
||||
MaybeFlush;
|
||||
N[SName]:=NewName;
|
||||
FDirty:=True;
|
||||
MaybeFlush;
|
||||
end;
|
||||
end;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user