Fix logic

This commit is contained in:
halx99 2021-09-30 14:36:42 +08:00
parent 366113e72e
commit 15cec5f982

View File

@ -2365,7 +2365,7 @@ PUGI__NS_BEGIN
if (header & header_mask) alloc->deallocate_string(dest);
// mark the string as not allocated
dest = source_length ? nullptr : const_cast<String>(source);
dest = source_length == 0 ? nullptr : const_cast<String>(source);
header &= ~header_mask;
return true;