From e74da72b824dfddacfb1c5386721d7094c0b7a94 Mon Sep 17 00:00:00 2001 From: Perttu Ahola Date: Thu, 5 Apr 2012 21:18:42 +0300 Subject: [PATCH] Fix crash when inputting only / in chat --- src/servercommand.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/servercommand.cpp b/src/servercommand.cpp index 2c74c81ea..cf89f7f56 100644 --- a/src/servercommand.cpp +++ b/src/servercommand.cpp @@ -160,11 +160,12 @@ void cmd_clearobjects(std::wostringstream &os, std::wstring processServerCommand(ServerCommandContext *ctx) { - std::wostringstream os(std::ios_base::binary); ctx->flags = SEND_TO_SENDER; // Default, unless we change it. - if(ctx->parms[0] == L"status") + if(ctx->parms.size() == 0) + os<parms[0] == L"status") cmd_status(os, ctx); else if(ctx->parms[0] == L"time") cmd_time(os, ctx); -- 2.25.1