fix crashes

closes #101
This commit is contained in:
m 2024-01-20 20:24:51 -06:00
parent 81c1b8fd99
commit 4df8505c04
2 changed files with 8 additions and 10 deletions

View File

@ -15,7 +15,7 @@ namespace logger
{
void sys_print_stub(const char* msg)
{
console::info(msg);
console::info("%s\n", msg);
}
void print_info(const char* msg, ...)
@ -29,7 +29,7 @@ namespace logger
va_end(ap);
console::info(buffer);
console::info("%s\n", buffer);
}
void print_warn(const char* msg, ...)
@ -43,7 +43,7 @@ namespace logger
va_end(ap);
console::warn(buffer);
console::warn("%s\n", buffer);
}
void print_error(const char* msg, ...)
@ -57,7 +57,7 @@ namespace logger
va_end(ap);
console::error(buffer);
console::error("%s\n", buffer);
}
void print_debug(const char* msg, ...)
@ -71,26 +71,24 @@ namespace logger
va_end(ap);
console::debug(buffer);
console::debug("%s\n", buffer);
}
void r_warn_once_per_frame_vsnprintf_stub(char* buffer, size_t buffer_length, char* msg, va_list va)
{
vsnprintf(buffer, buffer_length, msg, va);
console::warn(buffer);
console::warn("%s\n", buffer);
}
void com_init_pre()
{
console::info("%s %s build %s %s\n", "IW7", VERSION, "win64", __DATE__);
console::info("--- Common Initialization ---\n");
}
void com_init_post()
{
console::info("--- Common Initialization Complete ---\n");
console::info("Working directory: %s\n", game::Sys_Cwd());
}

View File

@ -148,7 +148,7 @@ namespace rcon
}
auto status_buffer = build_status_buffer();
console::info(status_buffer.data());
console::info("%s\n", status_buffer.data());
});
if (!game::environment::is_dedi())
@ -222,4 +222,4 @@ namespace rcon
};
}
REGISTER_COMPONENT(rcon::component)
REGISTER_COMPONENT(rcon::component)