Added delimiter to 'strtok' function

master
Aadhavan Srinivasan 2 years ago
parent a940d7acad
commit 770c03cf76

@ -4,9 +4,9 @@
char* fetch_address(char* message) {
char* token = malloc (sizeof(char) * strlen(message));
token = strtok(message," \n");
token = strtok(message," \r\n");
if (strcmp(token,"TO:") == 0) {
token = strtok(NULL," \n");
token = strtok(NULL," \r\n");
} else {
return NULL;
}

Loading…
Cancel
Save