mirror of
https://github.com/luanti-org/luanti.git
synced 2025-06-27 16:36:03 +00:00
Fix crash when inputting only / in chat
This commit is contained in:
parent
24953ba974
commit
e74da72b82
1 changed files with 3 additions and 2 deletions
|
@ -160,11 +160,12 @@ void cmd_clearobjects(std::wostringstream &os,
|
||||||
|
|
||||||
std::wstring processServerCommand(ServerCommandContext *ctx)
|
std::wstring processServerCommand(ServerCommandContext *ctx)
|
||||||
{
|
{
|
||||||
|
|
||||||
std::wostringstream os(std::ios_base::binary);
|
std::wostringstream os(std::ios_base::binary);
|
||||||
ctx->flags = SEND_TO_SENDER; // Default, unless we change it.
|
ctx->flags = SEND_TO_SENDER; // Default, unless we change it.
|
||||||
|
|
||||||
if(ctx->parms[0] == L"status")
|
if(ctx->parms.size() == 0)
|
||||||
|
os<<L"-!- Empty command";
|
||||||
|
else if(ctx->parms[0] == L"status")
|
||||||
cmd_status(os, ctx);
|
cmd_status(os, ctx);
|
||||||
else if(ctx->parms[0] == L"time")
|
else if(ctx->parms[0] == L"time")
|
||||||
cmd_time(os, ctx);
|
cmd_time(os, ctx);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue