Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
mpd
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Иван Мажукин
mpd
Commits
3a28f456
Commit
3a28f456
authored
Dec 08, 2014
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
AllCommands: assign current_command early
parent
4f6fc267
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
5 deletions
+4
-5
AllCommands.cxx
src/command/AllCommands.cxx
+4
-5
No files found.
src/command/AllCommands.cxx
View file @
3a28f456
...
...
@@ -357,11 +357,13 @@ command_process(Client &client, unsigned num, char *line)
command_list_num
=
num
;
/* get the command name (first word on the line) */
/* we have to set current_command because command_error()
expects it to be set */
Tokenizer
tokenizer
(
line
);
char
*
argv
[
COMMAND_ARGV_MAX
];
argv
[
0
]
=
tokenizer
.
NextWord
(
error
);
current_command
=
argv
[
0
]
=
tokenizer
.
NextWord
(
error
);
if
(
argv
[
0
]
==
nullptr
)
{
current_command
=
""
;
if
(
tokenizer
.
IsEnd
())
...
...
@@ -387,10 +389,7 @@ command_process(Client &client, unsigned num, char *line)
tokenizer
.
NextParam
(
error
))
!=
nullptr
)
++
argc
;
/* some error checks; we have to set current_command because
command_error() expects it to be set */
current_command
=
argv
[
0
];
/* some error checks */
if
(
argc
>=
COMMAND_ARGV_MAX
)
{
command_error
(
client
,
ACK_ERROR_ARG
,
"Too many arguments"
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment