Merge pull request #1852 from cohcho/fix_string

String: distinguish nullptr/empty str
This commit is contained in:
xmrig 2020-09-27 07:56:33 +07:00 committed by GitHub
commit 8952f6892d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -33,7 +33,7 @@
xmrig::String::String(const char *str) :
m_size(str == nullptr ? 0 : strlen(str))
{
if (m_size == 0) {
if (str == nullptr) {
return;
}