Skip to content

Commit 045d183

Browse files
committed
Parse semicolons in alias CCMDs correctly
1 parent fc11fd8 commit 045d183

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/c_console.c

+5-2
Original file line numberDiff line numberDiff line change
@@ -2227,7 +2227,9 @@ bool C_Responder(event_t *ev)
22272227
{
22282228
bool result = false;
22292229

2230-
if (M_StringStartsWith(consoleinput, "bind ") || M_StringStartsWith(consoleinput, "unbind "))
2230+
if (M_StringStartsWith(consoleinput, "bind ")
2231+
|| M_StringStartsWith(consoleinput, "unbind ")
2232+
|| M_StringStartsWith(consoleinput, "alias "))
22312233
{
22322234
if (C_ValidateInput(consoleinput))
22332235
result = true;
@@ -2374,7 +2376,8 @@ bool C_Responder(event_t *ev)
23742376
for (i = len - 1; i >= 0; i--)
23752377
if ((consoleinput[i] == ';'
23762378
&& M_StringStartsWith(consoleinput, "bind")
2377-
&& M_StringStartsWith(consoleinput, "unbind"))
2379+
&& M_StringStartsWith(consoleinput, "unbind")
2380+
&& M_StringStartsWith(consoleinput, "alias"))
23782381
|| (consoleinput[i] == '"'
23792382
&& M_StringStartsWith(consoleinput, "bind")))
23802383
break;

0 commit comments

Comments
 (0)