diff --git a/sources/ArticProtocolServer.cpp b/sources/ArticProtocolServer.cpp index 91c0284..c66f5c6 100644 --- a/sources/ArticProtocolServer.cpp +++ b/sources/ArticProtocolServer.cpp @@ -610,8 +610,10 @@ ArticProtocolCommon::Buffer* ArticProtocolServer::MethodInterface::ResizeLastRes void ArticProtocolServer::MethodInterface::FinishGood(int returnValue) { if (state == MethodState::GENERATING_OUTPUT) state = MethodState::FINISHED; - if (state == MethodState::PARSING_INPUT) + else if (state == MethodState::PARSING_INPUT) state = MethodState::UNEXPECTED_PARSING_INPUT; + else if (state == MethodState::FINISHED) + state = MethodState::INTERNAL_METHOD_ERROR; this->returnValue = returnValue; } void ArticProtocolServer::MethodInterface::FinishInternalError() { diff --git a/sources/Logger.cpp b/sources/Logger.cpp index b515ac0..cb523b4 100644 --- a/sources/Logger.cpp +++ b/sources/Logger.cpp @@ -153,12 +153,12 @@ void Logger::Handler() { printf("[I] %s\n", log.string.c_str()); break; case PendingLog::Type::WARNING: - topScreenConsole.fg = 19; + topScreenConsole.fg = 3; printf("[W] %s\n", log.string.c_str()); topScreenConsole.fg = 0; break; case PendingLog::Type::ERROR: - topScreenConsole.fg = 17; + topScreenConsole.fg = 1; printf("[E] %s\n", log.string.c_str()); topScreenConsole.fg = 0; break;