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

View File

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