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:
parent
dc094d442b
commit
126304cd48
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user