diff --git a/src/pugixml.cpp b/src/pugixml.cpp index d5ec1ad..7aa6f9e 100644 --- a/src/pugixml.cpp +++ b/src/pugixml.cpp @@ -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(source); + dest = source_length == 0 ? nullptr : const_cast(source); header &= ~header_mask; return true;