diff options
author | LemonBoy <thatlemon@gmail.com> | 2016-07-12 17:38:05 +0200 |
---|---|---|
committer | LemonBoy <thatlemon@gmail.com> | 2016-07-12 17:38:05 +0200 |
commit | bd4189907eceed6a2c3252c7099985f975fc1654 (patch) | |
tree | 0d1f9bbf56f63ee7c8a53a9db8d050a0cd75e6b6 /src | |
parent | b8f7eaad40d66b653fa1ff2ed366954e6e8d9732 (diff) | |
download | irssi-bd4189907eceed6a2c3252c7099985f975fc1654.zip |
Minor cosmetic fix in /unignore error message.
Reported here:
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=577202
Diffstat (limited to 'src')
-rw-r--r-- | src/fe-common/core/fe-ignore.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/fe-common/core/fe-ignore.c b/src/fe-common/core/fe-ignore.c index a809ac91..52b11e6b 100644 --- a/src/fe-common/core/fe-ignore.c +++ b/src/fe-common/core/fe-ignore.c @@ -215,7 +215,7 @@ static void cmd_unignore(const char *data) { IGNORE_REC *rec; GSList *tmp; - char *mask; + char *mask, *mask_orig; void *free_arg; if (!cmd_get_params(data, &free_arg, 1, &mask)) @@ -224,6 +224,10 @@ static void cmd_unignore(const char *data) if (*mask == '\0') cmd_param_error(CMDERR_NOT_ENOUGH_PARAMS); + /* Save the mask string here since it might be modified in the code + * below and we need it to print meaningful error messages. */ + mask_orig = mask; + if (is_numeric(mask, ' ')) { /* with index number */ tmp = g_slist_nth(ignores, atoi(mask)-1); @@ -248,7 +252,7 @@ static void cmd_unignore(const char *data) ignore_update_rec(rec); } else { printformat(NULL, NULL, MSGLEVEL_CLIENTNOTICE, - TXT_IGNORE_NOT_FOUND, mask); + TXT_IGNORE_NOT_FOUND, mask_orig); } cmd_params_free(free_arg); } |