Fix behaviour of /XDEBUG with no arguments (based on EPIC).
Previously it would carefully construct a string, then do nothing with it. git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@392 13b04d17-f746-0410-82c6-800466cd88b0
This commit is contained in:
@@ -75,18 +75,17 @@ BUILT_IN_COMMAND(xdebugcmd)
|
|||||||
if (!args || !*args)
|
if (!args || !*args)
|
||||||
{
|
{
|
||||||
char buffer[512];
|
char buffer[512];
|
||||||
char *q;
|
|
||||||
int i = 0;
|
int i = 0;
|
||||||
|
|
||||||
buffer[0] = 0;
|
buffer[0] = 0;
|
||||||
strlcat(buffer, "[-][+][option(s)] ", sizeof buffer);
|
|
||||||
q = &buffer[strlen(buffer)];
|
|
||||||
for (i = 0; opts[i].command; i++)
|
for (i = 0; opts[i].command; i++)
|
||||||
{
|
{
|
||||||
if (q)
|
if (i)
|
||||||
strlcat(q, ", ", sizeof buffer);
|
strlcat(buffer, ", ", sizeof buffer);
|
||||||
strlcat(q, opts[i].command, sizeof buffer);
|
strlcat(buffer, opts[i].command, sizeof buffer);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
say("Usage: XDEBUG [-][+]%s", buffer);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user