Skip to content

Commit

Permalink
Fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
DmBel committed Feb 25, 2025
1 parent e92fd44 commit 608d88a
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 5 deletions.
2 changes: 1 addition & 1 deletion blcksock.pas
Original file line number Diff line number Diff line change
Expand Up @@ -2443,7 +2443,7 @@ function TBlockSocket.RecvPacket(Timeout: Integer): TSynaBytes;
begin
{$IFDEF MSWINDOWS}
//not drain CPU on large downloads...
Sleep(10{0});
//Sleep(10{0});
{$ENDIF}
x := WaitingData;
if x > 0 then
Expand Down
15 changes: 11 additions & 4 deletions synabyte.pas
Original file line number Diff line number Diff line change
Expand Up @@ -234,23 +234,30 @@ function TSynaBytes.AGetLength: NativeInt;

class operator TSynaBytes.Implicit(const V1: TSynaBytes): String;
var
//I: Integer;
//C: PWord;
{$IFDEF MSWINDOWS}
S: RawByteString;
{$ELSE}
I: Integer;
C: PWord;
{$ENDIF}
begin
SetLength(Result, V1.Length);
if V1.Length > 0 then
begin
//ïåðåïèñàë, 4873
{$IFDEF MSWINDOWS}
SetLength(s, V1.Length);
Move(V1.FBytes[0], s[1], V1.Length);
Result := string(s);
{C := PWord(PWideChar(Result));
//åùå ïåðåïèñàë, 7592
{$ELSE}
C := PWord(PWideChar(Result));
for I := 0 to V1.Length-1 do
begin
C^ := V1.FBytes[I];
Inc(C);
end;}
end;
{$ENDIF}
end;
end;

Expand Down

0 comments on commit 608d88a

Please sign in to comment.