diff --git a/Client/UfrmMain.pas b/Client/UfrmMain.pas index 9c7459f..a66024f 100644 --- a/Client/UfrmMain.pas +++ b/Client/UfrmMain.pas @@ -1977,8 +1977,12 @@ begin Stream.Read(locationInfo^.Y, SizeOf(Word)); stringLength := 0; Stream.Read(stringLength, SizeOf(Integer)); - SetLength(s, stringLength); - Stream.Read(s[1], stringLength); + if stringLength > 0 then + begin + SetLength(s, stringLength); + Stream.Read(s[1], stringLength); + end else + SetLength(s, 0); locationInfo^.Name := s; end; @@ -2005,7 +2009,8 @@ begin Stream.Write(locationInfo^.Y, SizeOf(Word)); stringLength := Length(locationInfo^.Name); Stream.Write(stringLength, SizeOf(Integer)); - Stream.Write(locationInfo^.Name[1], stringLength); + if stringLength > 0 then + Stream.Write(locationInfo^.Name[1], stringLength); end; procedure TfrmMain.vstUoaDesignsDblClick(Sender: TObject);