mirror of
https://github.com/EQEmu/Server.git
synced 2026-06-24 17:48:20 +00:00
Crash and compile issues on windows
This commit is contained in:
@@ -81,12 +81,12 @@ namespace EQEmuCommand {
|
|||||||
|
|
||||||
if (!arguments_filled || argc == 2) {
|
if (!arguments_filled || argc == 2) {
|
||||||
std::string arguments_string;
|
std::string arguments_string;
|
||||||
for (auto &arg : arguments) {
|
for (auto &arg : arguments) {
|
||||||
arguments_string += " " + arg + "=*\n";
|
arguments_string += " " + arg + "=*\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string options_string;
|
std::string options_string;
|
||||||
for (auto &opt : options) {
|
for (auto &opt : options) {
|
||||||
options_string += " " + opt + "\n";
|
options_string += " " + opt + "\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -440,7 +440,7 @@ void EQEmuLogSys::Out(
|
|||||||
const char *file,
|
const char *file,
|
||||||
const char *func,
|
const char *func,
|
||||||
int line,
|
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);
|
prefix = fmt::format("[{0}::{1}:{2}] ", base_file_name(file), func, line);
|
||||||
}
|
}
|
||||||
|
|
||||||
auto msg_cstr = message.c_str();
|
|
||||||
va_list args;
|
va_list args;
|
||||||
va_start(args, msg_cstr);
|
va_start(args, message);
|
||||||
std::string output_message = vStringFormat(msg_cstr, args);
|
std::string output_message = vStringFormat(message, args);
|
||||||
va_end(args);
|
va_end(args);
|
||||||
|
|
||||||
std::string output_debug_message = EQEmuLogSys::FormatOutMessageString(log_category, prefix + output_message);
|
std::string output_debug_message = EQEmuLogSys::FormatOutMessageString(log_category, prefix + output_message);
|
||||||
|
|||||||
@@ -272,7 +272,7 @@ public:
|
|||||||
const char *file,
|
const char *file,
|
||||||
const char *func,
|
const char *func,
|
||||||
int line,
|
int line,
|
||||||
const std::string &message,
|
const char *message,
|
||||||
...
|
...
|
||||||
);
|
);
|
||||||
|
|
||||||
@@ -410,7 +410,7 @@ void OutF(
|
|||||||
)
|
)
|
||||||
{
|
{
|
||||||
std::string log_str = fmt::format(fmt, args...);
|
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
|
#endif
|
||||||
|
|||||||
@@ -163,7 +163,7 @@ namespace LoginserverCommandHandler {
|
|||||||
|
|
||||||
std::vector<std::string> arguments = {
|
std::vector<std::string> arguments = {
|
||||||
"--username",
|
"--username",
|
||||||
"--password"
|
"--password",
|
||||||
"--email"
|
"--email"
|
||||||
};
|
};
|
||||||
std::vector<std::string> options = {};
|
std::vector<std::string> options = {};
|
||||||
|
|||||||
@@ -3618,11 +3618,11 @@ XS(XS__debug) {
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
if (debug_level == Logs::General) {
|
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) {
|
} 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) {
|
} else if (debug_level == Logs::Detail) {
|
||||||
Log(Logs::Detail, Logs::QuestDebug, log_message);
|
Log(Logs::Detail, Logs::QuestDebug, log_message.c_str());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
XSRETURN_EMPTY;
|
XSRETURN_EMPTY;
|
||||||
|
|||||||
@@ -1368,14 +1368,14 @@ double lua_clock() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void lua_debug(std::string message) {
|
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) {
|
void lua_debug(std::string message, int level) {
|
||||||
if (level < Logs::General || level > Logs::Detail)
|
if (level < Logs::General || level > Logs::Detail)
|
||||||
return;
|
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) {
|
void lua_update_zone_header(std::string type, std::string value) {
|
||||||
|
|||||||
Reference in New Issue
Block a user