String: distinguish nullptr/empty str

This commit is contained in:
cohcho 2020-09-26 16:41:15 +00:00
parent 3a01ebe277
commit f7d6348948

View file

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