Jump to content
djhfwk

Ping buffer msg not copyed to FDataBuf

Recommended Posts

  // Fill data buffer with some data bytes and trailing spaces
    if Length (FDataBuf) < FSize then SetLength (FDataBuf, FSize);           // buffer for data sent
    FRBufSize := Length (FReplyBuf);  // space for several replies
    FillChar(FDataBuf[0], FSize, $20);
    S := AnsiString (FPingMsg);
    Move(S, FDataBuf[0], MinInteger(FSize, Length(S)));    { V8.02 Msg now property, V8.04 ANSI }
    FillChar(FReplyBuf[0], FRBufSize, 0);

Code should be fix with 

Move(S[1], FDataBuf[0], MinInteger(FSize, Length(S)));    { V8.02 Msg now property, V8.04 ANSI }

 

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×