summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/plugins/aspell/weechat-aspell-command.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/plugins/aspell/weechat-aspell-command.c b/src/plugins/aspell/weechat-aspell-command.c
index 41d9e461e..28a50589e 100644
--- a/src/plugins/aspell/weechat-aspell-command.c
+++ b/src/plugins/aspell/weechat-aspell-command.c
@@ -441,14 +441,18 @@ weechat_aspell_command_cb (void *data, struct t_gui_buffer *buffer,
/* add word to personal dictionary */
if (weechat_strcasecmp (argv[1], "addword") == 0)
{
- if (argc <= 2)
+ if (argc < 3)
return WEECHAT_RC_ERROR;
if (argc > 3)
+ {
/* use a given dict */
weechat_aspell_command_add_word (buffer, argv[2], argv_eol[3]);
- else if (argc > 2)
+ }
+ else
+ {
/* use default dict */
weechat_aspell_command_add_word (buffer, NULL, argv_eol[2]);
+ }
return WEECHAT_RC_OK;
}