BAN: String don't memcpy with nullptr

This commit is contained in:
Bananymous 2024-01-17 19:04:40 +01:00
parent 54a92293da
commit a5660b95b2
1 changed files with 2 additions and 1 deletions

View File

@ -254,6 +254,7 @@ namespace BAN
if (new_data == nullptr)
return Error::from_errno(ENOMEM);
if (m_size)
memcpy(new_data, data(), m_size + 1);
if (has_sso())