mirror of
https://github.com/fumiama/simple-kanban.git
synced 2026-06-05 00:10:29 +08:00
fix sigsegv
This commit is contained in:
6
server.c
6
server.c
@@ -311,8 +311,10 @@ static int close_file_and_send(threadtimer_t *timer, char *data, size_t numbytes
|
||||
puts("<--- break --->"); \
|
||||
break; \
|
||||
} \
|
||||
buff[0] = store;\
|
||||
memmove(buff + 1, buff + l + 1, n - 1);\
|
||||
if(n > 0) { \
|
||||
buff[0] = store; \
|
||||
memmove(buff + 1, buff + l + 1, n - 1); \
|
||||
} \
|
||||
buff[n] = 0;\
|
||||
(p)->numbytes = n;\
|
||||
puts("<--- pass --->");\
|
||||
|
||||
Reference in New Issue
Block a user