Skip to content

Commit

Permalink
Add more asserts.
Browse files Browse the repository at this point in the history
  • Loading branch information
skullernet authored and res2k committed Jan 21, 2024
1 parent 0db8e30 commit e019b6b
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/server/send.c
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ void SV_FlushRedirect(int redirected, char *outputbuf, size_t len)
byte buffer[MAX_PACKETLEN_DEFAULT];

if (redirected == RD_PACKET) {
Q_assert(len <= sizeof(buffer) - 10);
memcpy(buffer, "\xff\xff\xff\xffprint\n", 10);
memcpy(buffer + 10, outputbuf, len);
NET_SendPacket(NS_SERVER, buffer, len + 10, &net_from);
Expand Down Expand Up @@ -728,6 +729,7 @@ static void write_datagram_old(client_t *client)
maxsize -= msg->cursize;
}
}
Q_assert(maxsize <= client->netchan.maxpacketlen);

// send over all the relevant entity_state_t
// and the player_state_t
Expand Down

0 comments on commit e019b6b

Please sign in to comment.