add defensive 0

This commit is contained in:
Denis Angell
2025-07-02 10:26:48 +02:00
parent 70bae7d055
commit dcfe53c479

View File

@@ -241,7 +241,7 @@ verifyHandshake(
if (auto const iter = headers.find("Network-ID"); iter != headers.end())
{
std::uint32_t nid;
std::uint32_t nid{0};
if (!beast::lexicalCastChecked(nid, std::string(iter->value())))
throw std::runtime_error("Invalid peer network identifier");