Parse clone sites through bounded views
Foundation / checks (deploy) (push) Successful in 5s
Foundation / checks (ecs) (push) Successful in 1m58s
Foundation / checks (tsan) (push) Successful in 8m51s
Foundation / checks (client) (push) Successful in 13m33s
Foundation / checks (network) (push) Successful in 15m10s
Foundation / checks (postgres) (push) Failing after 25m19s
Foundation / postgres-tools (push) Canceled after 0s
Foundation / server-image (push) Canceled after 0s
Foundation / image (push) Canceled after 0s
Foundation / checks (checks) (push) Canceled after 28m29s

This commit is contained in:
dingo
2026-10-11 19:00:21 -04:00
parent 11bff3169e
commit dcf89d9444
2 changed files with 8 additions and 5 deletions
+6 -5
View File
@@ -121,12 +121,13 @@ std::optional<server::SpawnSite> site(std::string_view text) {
const auto comma = text.find(',');
if (comma == std::string_view::npos || text.find(',', comma + 1) != std::string_view::npos)
return std::nullopt;
const auto x_text = text.substr(0, comma);
const auto y_text = text.substr(comma + 1);
std::int32_t x{}, y{};
const auto [x_end, x_error] = std::from_chars(text.data(), text.data() + comma, x);
const auto [y_end, y_error] =
std::from_chars(text.data() + comma + 1, text.data() + text.size(), y);
if (x_error != std::errc{} || x_end != text.data() + comma || y_error != std::errc{} ||
y_end != text.data() + text.size())
const auto [x_end, x_error] = std::from_chars(x_text.begin(), x_text.end(), x);
const auto [y_end, y_error] = std::from_chars(y_text.begin(), y_text.end(), y);
if (x_error != std::errc{} || x_end != x_text.end() || y_error != std::errc{} ||
y_end != y_text.end())
return std::nullopt;
return server::SpawnSite{x, y};
}