mirror of
https://github.com/alterware/iw4-validator.git
synced 2025-12-07 18:17:47 +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
|
||||
|
||||
env:
|
||||
PREMAKE_VERSION: "5.0.0-beta6"
|
||||
PREMAKE_VERSION: "5.0.0-beta7"
|
||||
|
||||
jobs:
|
||||
build-windows:
|
||||
name: Build Windows
|
||||
runs-on: windows-2022
|
||||
runs-on: windows-2025
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
@@ -162,7 +162,7 @@ jobs:
|
||||
- name: Download Release binaries
|
||||
uses: actions/download-artifact@main
|
||||
with:
|
||||
name: windows-x64-release
|
||||
name: windows-x64-release-msvc
|
||||
|
||||
# Set up committer info and GPG key
|
||||
- name: Install SSH key
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
#pragma once
|
||||
#include "memory.hpp"
|
||||
#include <cstdarg>
|
||||
|
||||
namespace utils::string
|
||||
{
|
||||
@@ -28,16 +29,21 @@ 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
|
||||
va_list ap_copy;
|
||||
va_copy(ap_copy, ap);
|
||||
|
||||
if (res > 0) break; // Success
|
||||
if (res == 0) return nullptr; // Error
|
||||
const auto res = vsnprintf(entry->buffer_, entry->size_, format, ap_copy);
|
||||
va_end(ap_copy);
|
||||
|
||||
entry->double_size();
|
||||
if (res < 0) return nullptr; // Error
|
||||
|
||||
if (static_cast<std::size_t>(res) >= entry->size_)
|
||||
{
|
||||
entry->double_size();
|
||||
continue;
|
||||
}
|
||||
|
||||
break; // >= 0 Success
|
||||
}
|
||||
|
||||
return entry->buffer_;
|
||||
|
||||
Reference in New Issue
Block a user