1
0
mirror of https://github.com/fumiama/simple-kanban.git synced 2026-06-07 09:20:27 +08:00

fix: string compare issue

This commit is contained in:
源文雨
2023-03-16 00:54:27 +08:00
parent 20a2dbd1b1
commit 0bb1076898

View File

@@ -310,7 +310,7 @@ static int close_file_and_send(threadtimer_t *timer, char *data, size_t numbytes
return send_data(timer->accept_fd, data, numbytes);
}
#define take_word(p, w, buff) if((p)->numbytes >= strlen(w) && strncmp(buff, w, strlen(w)) == buff) {\
#define take_word(p, w, buff) if((p)->numbytes >= strlen(w) && !strncmp(buff, w, strlen(w))) {\
printf("<--- Taking: %s in %zd --->\n", w, (p)->numbytes);\
int l = strlen(w);\
char store = buff[l];\