From 15cec5f982d64c67c6a16157bd9d51f4ad9791e3 Mon Sep 17 00:00:00 2001 From: halx99 Date: Thu, 30 Sep 2021 14:36:42 +0800 Subject: [PATCH] Fix logic --- src/pugixml.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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;