diff --git a/common/cli/eqemu_command_handler.cpp b/common/cli/eqemu_command_handler.cpp index 79e87dfd8..6c08edeff 100644 --- a/common/cli/eqemu_command_handler.cpp +++ b/common/cli/eqemu_command_handler.cpp @@ -81,12 +81,12 @@ namespace EQEmuCommand { if (!arguments_filled || argc == 2) { std::string arguments_string; - for (auto &arg : arguments) { + for (auto &arg : arguments) { arguments_string += " " + arg + "=*\n"; } std::string options_string; - for (auto &opt : options) { + for (auto &opt : options) { options_string += " " + opt + "\n"; } diff --git a/common/eqemu_logsys.cpp b/common/eqemu_logsys.cpp index 87d4465b4..d35592aa4 100644 --- a/common/eqemu_logsys.cpp +++ b/common/eqemu_logsys.cpp @@ -440,7 +440,7 @@ void EQEmuLogSys::Out( const char *file, const char *func, int line, - const std::string &message, + const char *message, ... ) { @@ -470,10 +470,9 @@ void EQEmuLogSys::Out( prefix = fmt::format("[{0}::{1}:{2}] ", base_file_name(file), func, line); } - auto msg_cstr = message.c_str(); va_list args; - va_start(args, msg_cstr); - std::string output_message = vStringFormat(msg_cstr, args); + va_start(args, message); + std::string output_message = vStringFormat(message, args); va_end(args); std::string output_debug_message = EQEmuLogSys::FormatOutMessageString(log_category, prefix + output_message); diff --git a/common/eqemu_logsys.h b/common/eqemu_logsys.h index f3c48ae88..f2c68c09b 100644 --- a/common/eqemu_logsys.h +++ b/common/eqemu_logsys.h @@ -272,7 +272,7 @@ public: const char *file, const char *func, int line, - const std::string &message, + const char *message, ... ); @@ -410,7 +410,7 @@ void OutF( ) { std::string log_str = fmt::format(fmt, args...); - ls.Out(debug_level, log_category, file, func, line, log_str); + ls.Out(debug_level, log_category, file, func, line, log_str.c_str()); } #endif diff --git a/loginserver/loginserver_command_handler.cpp b/loginserver/loginserver_command_handler.cpp index e4a316a5f..68cd3ea5d 100644 --- a/loginserver/loginserver_command_handler.cpp +++ b/loginserver/loginserver_command_handler.cpp @@ -163,7 +163,7 @@ namespace LoginserverCommandHandler { std::vector arguments = { "--username", - "--password" + "--password", "--email" }; std::vector options = {}; diff --git a/zone/embparser_api.cpp b/zone/embparser_api.cpp index bdb190e9c..cf2feabcf 100644 --- a/zone/embparser_api.cpp +++ b/zone/embparser_api.cpp @@ -3618,11 +3618,11 @@ XS(XS__debug) { return; if (debug_level == Logs::General) { - Log(Logs::General, Logs::QuestDebug, log_message); + Log(Logs::General, Logs::QuestDebug, log_message.c_str()); } else if (debug_level == Logs::Moderate) { - Log(Logs::Moderate, Logs::QuestDebug, log_message); + Log(Logs::Moderate, Logs::QuestDebug, log_message.c_str()); } else if (debug_level == Logs::Detail) { - Log(Logs::Detail, Logs::QuestDebug, log_message); + Log(Logs::Detail, Logs::QuestDebug, log_message.c_str()); } } XSRETURN_EMPTY; diff --git a/zone/lua_general.cpp b/zone/lua_general.cpp index ef9180b68..295fa260e 100644 --- a/zone/lua_general.cpp +++ b/zone/lua_general.cpp @@ -1368,14 +1368,14 @@ double lua_clock() { } void lua_debug(std::string message) { - Log(Logs::General, Logs::QuestDebug, message); + Log(Logs::General, Logs::QuestDebug, message.c_str()); } void lua_debug(std::string message, int level) { if (level < Logs::General || level > Logs::Detail) return; - Log(static_cast(level), Logs::QuestDebug, message); + Log(static_cast(level), Logs::QuestDebug, message.c_str()); } void lua_update_zone_header(std::string type, std::string value) {