mirror of
https://github.com/alterware/aw-installer.git
synced 2025-04-18 23:52:53 +00:00
chore: remove _s functions
This commit is contained in:
parent
1cb507571b
commit
93e1e1c273
@ -65,11 +65,7 @@ namespace console
|
|||||||
{
|
{
|
||||||
static thread_local char buffer[0x1000];
|
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);
|
const int count = vsnprintf(buffer, sizeof(buffer), message, *ap);
|
||||||
#endif
|
|
||||||
|
|
||||||
if (count < 0) return {};
|
if (count < 0) return {};
|
||||||
return {buffer, static_cast<size_t>(count)};
|
return {buffer, static_cast<size_t>(count)};
|
||||||
|
@ -18,9 +18,9 @@ namespace
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
console::info("AlterWare Installer\n"
|
console::info("AlterWare Installer\n"
|
||||||
"Usage: %s OPTIONS\n"
|
"Usage: %s OPTIONS\n"
|
||||||
" -update-iw4x\n",
|
" -update-iw4x",
|
||||||
prog.data()
|
prog.c_str()
|
||||||
);
|
);
|
||||||
|
|
||||||
return EXIT_FAILURE;
|
return EXIT_FAILURE;
|
||||||
|
@ -29,11 +29,7 @@ namespace utils::string
|
|||||||
|
|
||||||
while (true)
|
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);
|
const auto res = vsnprintf(entry->buffer_, entry->size_, format, ap);
|
||||||
#endif
|
|
||||||
|
|
||||||
if (res > 0) break; // Success
|
if (res > 0) break; // Success
|
||||||
if (res == 0) return nullptr; // Error
|
if (res == 0) return nullptr; // Error
|
||||||
|
BIN
tools/premake5.exe
Normal file
BIN
tools/premake5.exe
Normal file
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user