mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-11 16:51:29 +00:00
Crash and compile issues on windows
This commit is contained in:
parent
b62944c5fb
commit
880de837d9
@ -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";
|
||||
}
|
||||
|
||||
|
||||
@ -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);
|
||||
|
||||
@ -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
|
||||
|
||||
@ -163,7 +163,7 @@ namespace LoginserverCommandHandler {
|
||||
|
||||
std::vector<std::string> arguments = {
|
||||
"--username",
|
||||
"--password"
|
||||
"--password",
|
||||
"--email"
|
||||
};
|
||||
std::vector<std::string> options = {};
|
||||
|
||||
@ -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;
|
||||
|
||||
@ -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<Logs::DebugLevel>(level), Logs::QuestDebug, message);
|
||||
Log(static_cast<Logs::DebugLevel>(level), Logs::QuestDebug, message.c_str());
|
||||
}
|
||||
|
||||
void lua_update_zone_header(std::string type, std::string value) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user