commit kcp

This commit is contained in:
skywind3000 2015-09-02 17:01:41 +08:00
parent b3c3a19132
commit c6d74fbdc2

4
ikcp.c
View File

@ -901,7 +901,7 @@ void ikcp_flush(ikcpcb *kcp)
if (kcp->probe & IKCP_ASK_SEND) {
seg.cmd = IKCP_CMD_WASK;
size = (int)(ptr - buffer);
if (size + IKCP_OVERHEAD >= (int)kcp->mtu) {
if (size + IKCP_OVERHEAD > (int)kcp->mtu) {
ikcp_output(kcp, buffer, size);
ptr = buffer;
}
@ -912,7 +912,7 @@ void ikcp_flush(ikcpcb *kcp)
if (kcp->probe & IKCP_ASK_TELL) {
seg.cmd = IKCP_CMD_WINS;
size = (int)(ptr - buffer);
if (size + IKCP_OVERHEAD >= (int)kcp->mtu) {
if (size + IKCP_OVERHEAD > (int)kcp->mtu) {
ikcp_output(kcp, buffer, size);
ptr = buffer;
}