8 Commits
0.0.1 ... 0.0.2

Author SHA1 Message Date
07f54e71bd fix: copy va 2025-11-29 18:25:37 +01:00
3231438f20 fix: correct usage of C func 2025-11-28 23:13:04 +01:00
fd5b0da1af Merge pull request #124 from alterware/dependabot/submodules/deps/GSL-543d0dd
build(deps): bump deps/GSL from `494e6e9` to `543d0dd`
2025-11-01 18:03:26 +01:00
638f83694b Merge pull request #123 from alterware/dependabot/submodules/deps/libtomcrypt-a3cc5bf
build(deps): bump deps/libtomcrypt from `5edb54e` to `a3cc5bf`
2025-11-01 17:37:10 +01:00
dependabot[bot]
0feed9adaf build(deps): bump deps/GSL from 494e6e9 to 543d0dd
Bumps [deps/GSL](https://github.com/Microsoft/GSL) from `494e6e9` to `543d0dd`.
- [Release notes](https://github.com/Microsoft/GSL/releases)
- [Commits](494e6e988c...543d0dd3fe)

---
updated-dependencies:
- dependency-name: deps/GSL
  dependency-version: 543d0dd3fe966ddf20e884b44e5fdbf12cb43784
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-11-01 14:01:57 +00:00
dependabot[bot]
83c16a1b8c build(deps): bump deps/libtomcrypt from 5edb54e to a3cc5bf
Bumps [deps/libtomcrypt](https://github.com/libtom/libtomcrypt) from `5edb54e` to `a3cc5bf`.
- [Release notes](https://github.com/libtom/libtomcrypt/releases)
- [Commits](5edb54e522...a3cc5bf623)

---
updated-dependencies:
- dependency-name: deps/libtomcrypt
  dependency-version: a3cc5bf62341b7269ace805fa227b701ddae4165
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-11-01 14:01:54 +00:00
2554b7fd3c Merge pull request #122 from alterware/dependabot/submodules/deps/GSL-494e6e9
build(deps): bump deps/GSL from `7e0943d` to `494e6e9`
2025-10-12 17:04:10 +02:00
dependabot[bot]
3f1c3acb57 build(deps): bump deps/GSL from 7e0943d to 494e6e9
Bumps [deps/GSL](https://github.com/Microsoft/GSL) from `7e0943d` to `494e6e9`.
- [Release notes](https://github.com/Microsoft/GSL/releases)
- [Commits](7e0943d20d...494e6e988c)

---
updated-dependencies:
- dependency-name: deps/GSL
  dependency-version: 494e6e988cc55d0bc7f3763c076ec358a38c68a6
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-10-01 14:03:54 +00:00
3 changed files with 16 additions and 6 deletions

2
deps/GSL vendored

Submodule deps/GSL updated: 7e0943d20d...543d0dd3fe

View File

@@ -1,5 +1,6 @@
#pragma once
#include "memory.hpp"
#include <cstdarg>
#include <cstdint>
template <class Type, std::size_t n>
@@ -29,12 +30,21 @@ namespace utils::string
while (true)
{
const auto res = vsnprintf(entry->buffer_, entry->size_, format, ap);
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);
if (res < 0) return nullptr; // Error
if (static_cast<std::size_t>(res) >= entry->size_)
{
entry->double_size();
continue;
}
break; // Success
}
return entry->buffer_;