mirror of
https://github.com/apache/nuttx-apps.git
synced 2025-10-20 04:26:04 +08:00
Fix incorrect argument count error message
The `too many arguments` and `missing required argument(s)` messages should be switched in order for the correct message to be shown to the user.
This commit is contained in:

committed by
Xiang Xiao

parent
d1bcd2977c
commit
41ce7d40f6
@@ -308,7 +308,7 @@ static int cmd_codecs_proc(FAR struct nsh_vtbl_s *vtbl, int argc,
|
||||
{
|
||||
sdata = argv[optind];
|
||||
}
|
||||
else if (optind >= argc)
|
||||
else if (optind < argc)
|
||||
{
|
||||
fmt = g_fmttoomanyargs;
|
||||
goto errout;
|
||||
|
Reference in New Issue
Block a user