fix length calculation

This commit is contained in:
Kelvin Sherlock 2019-07-07 19:45:48 -04:00
parent 3c0a26e412
commit 9e24014b62
1 changed files with 3 additions and 3 deletions

View File

@ -30,7 +30,7 @@ static Word LoginAndOpen(Connection *buffer) {
Int2Dec(buffer->port, message + length, 5, 0);
length += 5;
message[length] = 0;
message[0] = length;
message[0] = length - 1;
buffer->displayPtr(message);
}
@ -113,8 +113,8 @@ Word ConnectionPoll(Connection *buffer) {
return -1;
}
if (sr.srState ==
TCPSESTABLISHED) // && state == kConnectionStateConnecting)
/* && state == kConnectionStateConnecting */
if (sr.srState == TCPSESTABLISHED)
{
buffer->state = kConnectionStateConnected;
return 1;