Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Core/Libraries/Source/WWVegas/WWLib/always.h
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ private: \
return The##ARGCLASS##Pool; \
} \
protected: \
virtual int glueEnforcer() const { return sizeof(this); } \
virtual int glueEnforcer() const { return sizeof(*this); } \
public: \
inline void* operator new(size_t s) { return allocateFromW3DMemPool(getClassMemoryPool(), s); } \
inline void operator delete(void *p) { freeFromW3DMemPool(getClassMemoryPool(), p); } \
Expand Down
6 changes: 6 additions & 0 deletions Generals/Code/GameEngine/Include/Common/BitFlagsIO.h
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,13 @@ void BitFlags<NUMBITS>::xfer(Xfer* xfer)
{

// just call the xfer implementation on the data values
// TheSuperHackers @bugfix bobtista 05/12/2025 Fix sizeof(this) bug
// Original code used sizeof(this) which is pointer size
#ifndef RETAIL_COMPATIBLE_CRC
xfer->xferUser( this, sizeof( *this ) );
#else
xfer->xferUser( this, sizeof( this ) );
#endif

}
else
Expand Down
6 changes: 6 additions & 0 deletions GeneralsMD/Code/GameEngine/Include/Common/BitFlagsIO.h
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,13 @@ void BitFlags<NUMBITS>::xfer(Xfer* xfer)
{

// just call the xfer implementation on the data values
// TheSuperHackers @bugfix bobtista 05/12/2025 Fix sizeof(this) bug
// Original code used sizeof(this) which is pointer size
#ifndef RETAIL_COMPATIBLE_CRC
xfer->xferUser( this, sizeof( *this ) );
#else
xfer->xferUser( this, sizeof( this ) );
#endif

}
else
Expand Down
Loading