BAN: String don't memcpy with nullptr
This commit is contained in:
parent
54a92293da
commit
a5660b95b2
|
@ -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())
|
||||
|
|
Loading…
Reference in New Issue