Skip to content

Commit

Permalink
use SetString in LoadFromSteam
Browse files Browse the repository at this point in the history
  • Loading branch information
Alexey-T committed Oct 22, 2020
1 parent 13af814 commit 152e34b
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions atsynedit/atstrings_load.inc
Original file line number Diff line number Diff line change
Expand Up @@ -430,20 +430,14 @@ begin
case FEncoding of
cEncAnsi:
begin
SA:= '';
SetLength(SA, Len);
Move(Buf[NStart], SA[1], Len);

SetString(SA, @Buf[NStart], Len);
SUtf8:= EncConvertToUTF8(SA, FEncodingCodepage);

LineAddRaw_NoUndo(SUtf8, LineEnd);
end;

cEncUTF8:
begin
SA:= '';
SetLength(SA, Len);
Move(Buf[NStart], SA[1], Len);
SetString(SA, @Buf[NStart], Len);
LineAddRaw_NoUndo(SA, LineEnd);
end;

Expand Down

0 comments on commit 152e34b

Please sign in to comment.