1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00

* shell: strtok workaround

This commit is contained in:
Kaspar Schleiser 2010-11-03 13:53:11 +01:00
parent dc094d442b
commit 126304cd48

View File

@ -63,7 +63,8 @@ static void(*find_handler(const shell_command_t *command_list, char *command))(c
static void handle_input_line(shell_t *shell, char* line) {
char* saveptr;
char* command = strtok_r(line, " ", &saveptr);
char* linedup = strdup(line);
char* command = strtok_r(linedup, " ", &saveptr);
void (*handler)(char*) = NULL;
@ -75,7 +76,8 @@ static void handle_input_line(shell_t *shell, char* line) {
puts("shell: command not found.");
}
}
free(linedup);
}
int readline(shell_t *shell, char* buf, int size) {