1
0
mirror of https://github.com/anope/anope.git synced 2026-06-12 17:04:47 +02:00

Skip deserialising the old cert column when its empty.

This commit is contained in:
Sadie Powell
2026-04-23 13:44:45 +01:00
parent 9434be29bc
commit 64f386e29e
+5 -1
View File
@@ -207,6 +207,10 @@ public:
if (s->GetSerializableType()->GetName() != NICKCORE_TYPE)
return;
const auto certstr = data.Load("cert");
if (certstr.empty())
return; // Nothing to do.
auto *nc = anope_dynamic_static_cast<NickCore *>(e);
auto *cl = this->Require(nc);
@@ -219,7 +223,7 @@ public:
cl->certs.clear();
// Add the new cert list
spacesepstream sep(data.Load("cert"));
spacesepstream sep(certstr);
for (Anope::string buf; sep.GetToken(buf); )
{
auto *cert = new NSCertInfo(e);