Debugger: Fixed potential crash with writing (system.move) to empty string

git-svn-id: trunk@44004 -
This commit is contained in:
martin 2014-02-11 19:11:42 +00:00
parent a582592043
commit 366610e42d

View File

@ -209,6 +209,7 @@ begin
end; end;
SetLength(Result, len); SetLength(Result, len);
if len > 0 then
Move(Item^.Name.Ptr^, Result[1], len); Move(Item^.Name.Ptr^, Result[1], len);
end; end;
@ -222,6 +223,7 @@ begin
if item = nil then Exit; if item = nil then Exit;
SetLength(Result, Item^.Value.Len); SetLength(Result, Item^.Value.Len);
if Item^.Value.Len > 0 then
Move(Item^.Value.Ptr^, Result[1], Item^.Value.Len); Move(Item^.Value.Ptr^, Result[1], Item^.Value.Len);
end; end;