From eca355a4961f7550f8a1d1a7e1d3b90e34a7b920 Mon Sep 17 00:00:00 2001 From: PabloMK7 Date: Tue, 25 Mar 2025 21:04:18 +0100 Subject: [PATCH] Minor improvements --- sources/ArticProtocolServer.cpp | 4 +++- sources/Logger.cpp | 4 ++-- 2 files changed, 5 insertions(+), 3 deletions(-) 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;