diff --git a/src/pugixml.cpp b/src/pugixml.cpp index 9e6fe487701767753a8deaaee58c8dbd157d8bb4..94dca48b591bc9ba4f89894353d3da504aa8bd65 100644 --- a/src/pugixml.cpp +++ b/src/pugixml.cpp @@ -6875,7 +6875,8 @@ namespace pugi assert(!_root); #ifdef PUGIXML_COMPACT - const size_t page_offset = sizeof(uint32_t); + // space for page marker for the first page (uint32_t), rounded up to pointer size; assumes pointers are at least 32-bit + const size_t page_offset = sizeof(void*); #else const size_t page_offset = 0; #endif