mirror of
https://github.com/skywind3000/kcp.git
synced 2025-01-14 04:30:54 +08:00
使用宏定义而不是 magic number
This commit is contained in:
parent
1cd5683bb2
commit
9ceb65a664
2
ikcp.c
2
ikcp.c
@ -749,7 +749,7 @@ int ikcp_input(ikcpcb *kcp, const char *data, long size)
|
|||||||
ikcp_log(kcp, IKCP_LOG_INPUT, "[RI] %d bytes", size);
|
ikcp_log(kcp, IKCP_LOG_INPUT, "[RI] %d bytes", size);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (data == NULL || size < 24) return -1;
|
if (data == NULL || size < IKCP_OVERHEAD) return -1;
|
||||||
|
|
||||||
while (1) {
|
while (1) {
|
||||||
IUINT32 ts, sn, len, una, conv;
|
IUINT32 ts, sn, len, una, conv;
|
||||||
|
Loading…
Reference in New Issue
Block a user