1
0
mirror of https://github.com/fumiama/simple-kanban.git synced 2026-06-05 00:10:29 +08:00

fix null get

This commit is contained in:
源文雨
2023-03-17 12:36:45 +08:00
parent 23290f4d93
commit 4eb75fc5ce

View File

@@ -569,8 +569,16 @@ static int s1_get(threadtimer_t *timer) { //get kanban
int r = close_file_and_send(timer, "null", 4);
if(strstr(timer->data, "quit")) {
puts("Found last cmd is quit");
timer->numbytes = 0;
return 0;
}
int i = 0;
for(; i < timer->numbytes; i++) {
if(!isdigit(timer->data[i])) {
timer->numbytes -= i;
break;
}
}
return r;
}