Compare commits

..

4 Commits

Author SHA1 Message Date
85e4bfff4e fix(build): download msvc binaries 2025-11-29 18:38:12 +01:00
597e35bebd fix: copy va 2025-11-29 18:32:34 +01:00
e123218787 fix VA 2025-11-28 23:24:58 +01:00
c487e446c0 build: update Premake5 2025-09-17 17:18:33 +02:00
2 changed files with 17 additions and 11 deletions

View File

@@ -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

View File

@@ -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_;