diff --git a/src/console.cpp b/src/console.cpp index c5e0080..38312f1 100644 --- a/src/console.cpp +++ b/src/console.cpp @@ -65,11 +65,7 @@ namespace console { static thread_local char buffer[0x1000]; -#ifdef _WIN32 - const int count = vsnprintf_s(buffer, _TRUNCATE, message, *ap); -#else const int count = vsnprintf(buffer, sizeof(buffer), message, *ap); -#endif if (count < 0) return {}; return {buffer, static_cast(count)}; diff --git a/src/main.cpp b/src/main.cpp index 4211f23..c494574 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -18,9 +18,9 @@ namespace else { console::info("AlterWare Installer\n" - "Usage: %s OPTIONS\n" - " -update-iw4x\n", - prog.data() + "Usage: %s OPTIONS\n" + " -update-iw4x", + prog.c_str() ); return EXIT_FAILURE; diff --git a/src/utils/string.hpp b/src/utils/string.hpp index 692a7f4..4e416d8 100644 --- a/src/utils/string.hpp +++ b/src/utils/string.hpp @@ -29,11 +29,7 @@ namespace utils::string while (true) { -#ifdef _WIN32 - const auto res = vsnprintf_s(entry->buffer_, entry->size_, _TRUNCATE, format, ap); -#else const auto res = vsnprintf(entry->buffer_, entry->size_, format, ap); -#endif if (res > 0) break; // Success if (res == 0) return nullptr; // Error diff --git a/tools/premake5.exe b/tools/premake5.exe new file mode 100644 index 0000000..1a637aa Binary files /dev/null and b/tools/premake5.exe differ