mirror of
https://github.com/Shpoike/Quakespasm.git
synced 2024-11-10 07:21:58 +00:00
CSQC_Parse_StuffCmd was not being passed the newline chars properly (resulting in localcmd-based corruption).
This commit is contained in:
parent
3fb6be5d16
commit
4c5b960d45
1 changed files with 1 additions and 0 deletions
|
@ -2316,6 +2316,7 @@ static void CL_ParseStuffText(const char *msg)
|
||||||
PR_SwitchQCVM(&cl.qcvm);
|
PR_SwitchQCVM(&cl.qcvm);
|
||||||
tmp = PR_GetTempString();
|
tmp = PR_GetTempString();
|
||||||
memcpy(tmp, cl.stuffcmdbuf, str-cl.stuffcmdbuf);
|
memcpy(tmp, cl.stuffcmdbuf, str-cl.stuffcmdbuf);
|
||||||
|
tmp[str-cl.stuffcmdbuf-1] = '\n'; //put the terminator back, for lazy localcmds.
|
||||||
tmp[str-cl.stuffcmdbuf] = 0; //null terminate it.
|
tmp[str-cl.stuffcmdbuf] = 0; //null terminate it.
|
||||||
G_INT(OFS_PARM0) = PR_SetEngineString(tmp);
|
G_INT(OFS_PARM0) = PR_SetEngineString(tmp);
|
||||||
PR_ExecuteProgram(cl.qcvm.extfuncs.CSQC_Parse_StuffCmd);
|
PR_ExecuteProgram(cl.qcvm.extfuncs.CSQC_Parse_StuffCmd);
|
||||||
|
|
Loading…
Reference in a new issue