From 366113e72e3cf85896fa9f857bc0e899e07408dd Mon Sep 17 00:00:00 2001 From: halx99 Date: Thu, 30 Sep 2021 13:27:39 +0800 Subject: [PATCH] Make logic more clearly --- src/pugixml.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pugixml.cpp b/src/pugixml.cpp index 3eabaf6..d5ec1ad 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 = !shallow_copy ? nullptr : const_cast(source); + dest = source_length ? nullptr : const_cast(source); header &= ~header_mask; return true;