Skip to content

Commit

Permalink
Parse semicolons in alias CCMDs correctly
Browse files Browse the repository at this point in the history
  • Loading branch information
bradharding committed Oct 25, 2024
1 parent fc11fd8 commit 045d183
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/c_console.c
Original file line number Diff line number Diff line change
Expand Up @@ -2227,7 +2227,9 @@ bool C_Responder(event_t *ev)
{
bool result = false;

if (M_StringStartsWith(consoleinput, "bind ") || M_StringStartsWith(consoleinput, "unbind "))
if (M_StringStartsWith(consoleinput, "bind ")
|| M_StringStartsWith(consoleinput, "unbind ")
|| M_StringStartsWith(consoleinput, "alias "))
{
if (C_ValidateInput(consoleinput))
result = true;
Expand Down Expand Up @@ -2374,7 +2376,8 @@ bool C_Responder(event_t *ev)
for (i = len - 1; i >= 0; i--)
if ((consoleinput[i] == ';'
&& M_StringStartsWith(consoleinput, "bind")
&& M_StringStartsWith(consoleinput, "unbind"))
&& M_StringStartsWith(consoleinput, "unbind")
&& M_StringStartsWith(consoleinput, "alias"))
|| (consoleinput[i] == '"'
&& M_StringStartsWith(consoleinput, "bind")))
break;
Expand Down

0 comments on commit 045d183

Please sign in to comment.