mirror of
https://github.com/alterware/iw4-validator.git
synced 2025-12-09 02:57:48 +00:00
Compare commits
4 Commits
3b1787a185
...
0.0.1
| Author | SHA1 | Date | |
|---|---|---|---|
|
85e4bfff4e
|
|||
|
597e35bebd
|
|||
|
e123218787
|
|||
| c487e446c0 |
6
.github/workflows/build.yml
vendored
6
.github/workflows/build.yml
vendored
@@ -16,12 +16,12 @@ concurrency:
|
|||||||
cancel-in-progress: true
|
cancel-in-progress: true
|
||||||
|
|
||||||
env:
|
env:
|
||||||
PREMAKE_VERSION: "5.0.0-beta6"
|
PREMAKE_VERSION: "5.0.0-beta7"
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build-windows:
|
build-windows:
|
||||||
name: Build Windows
|
name: Build Windows
|
||||||
runs-on: windows-2022
|
runs-on: windows-2025
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
@@ -162,7 +162,7 @@ jobs:
|
|||||||
- name: Download Release binaries
|
- name: Download Release binaries
|
||||||
uses: actions/download-artifact@main
|
uses: actions/download-artifact@main
|
||||||
with:
|
with:
|
||||||
name: windows-x64-release
|
name: windows-x64-release-msvc
|
||||||
|
|
||||||
# Set up committer info and GPG key
|
# Set up committer info and GPG key
|
||||||
- name: Install SSH key
|
- name: Install SSH key
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
#include "memory.hpp"
|
#include "memory.hpp"
|
||||||
|
#include <cstdarg>
|
||||||
|
|
||||||
namespace utils::string
|
namespace utils::string
|
||||||
{
|
{
|
||||||
@@ -28,16 +29,21 @@ namespace utils::string
|
|||||||
|
|
||||||
while (true)
|
while (true)
|
||||||
{
|
{
|
||||||
#ifdef _WIN32
|
va_list ap_copy;
|
||||||
const auto res = vsnprintf_s(entry->buffer_, entry->size_, _TRUNCATE, format, ap);
|
va_copy(ap_copy, ap);
|
||||||
#else
|
|
||||||
const auto res = vsnprintf(entry->buffer_, entry->size_, format, ap);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
if (res > 0) break; // Success
|
const auto res = vsnprintf(entry->buffer_, entry->size_, format, ap_copy);
|
||||||
if (res == 0) return nullptr; // Error
|
va_end(ap_copy);
|
||||||
|
|
||||||
|
if (res < 0) return nullptr; // Error
|
||||||
|
|
||||||
|
if (static_cast<std::size_t>(res) >= entry->size_)
|
||||||
|
{
|
||||||
entry->double_size();
|
entry->double_size();
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
break; // >= 0 Success
|
||||||
}
|
}
|
||||||
|
|
||||||
return entry->buffer_;
|
return entry->buffer_;
|
||||||
|
|||||||
Reference in New Issue
Block a user