diff options
author | Sébastien Helleu <flashcode@flashtux.org> | 2020-05-03 16:33:02 +0200 |
---|---|---|
committer | Sébastien Helleu <flashcode@flashtux.org> | 2020-05-03 16:33:02 +0200 |
commit | dff1bf6f0f5521cf9e23e2b32a648512e13b6a72 (patch) | |
tree | f3e741ae541ce18d3b66f7f78a456521cb6cd5f5 | |
parent | 5438f62f7489d6651973501b84b29200d7fd74d3 (diff) | |
download | weechat-dff1bf6f0f5521cf9e23e2b32a648512e13b6a72.zip |
exec: return NULL immediately if the task id is invalid
-rw-r--r-- | src/plugins/exec/exec.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/plugins/exec/exec.c b/src/plugins/exec/exec.c index b6312f472..44544628d 100644 --- a/src/plugins/exec/exec.c +++ b/src/plugins/exec/exec.c @@ -89,7 +89,7 @@ exec_search_by_id (const char *id) error = NULL; number = strtol (id, &error, 10); if (!error || error[0]) - number = -1; + return NULL; for (ptr_exec_cmd = exec_cmds; ptr_exec_cmd; ptr_exec_cmd = ptr_exec_cmd->next_cmd) |