diff options
Diffstat (limited to 'Source/ThirdParty/ANGLE/src/compiler/PoolAlloc.cpp')
-rw-r--r-- | Source/ThirdParty/ANGLE/src/compiler/PoolAlloc.cpp | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/Source/ThirdParty/ANGLE/src/compiler/PoolAlloc.cpp b/Source/ThirdParty/ANGLE/src/compiler/PoolAlloc.cpp index 93e21e4..a600c02 100644 --- a/Source/ThirdParty/ANGLE/src/compiler/PoolAlloc.cpp +++ b/Source/ThirdParty/ANGLE/src/compiler/PoolAlloc.cpp @@ -151,16 +151,23 @@ const unsigned char TAllocation::userDataFill = 0xcd; // void TAllocation::checkGuardBlock(unsigned char* blockMem, unsigned char val, const char* locText) const { +#ifdef GUARD_BLOCKS for (size_t x = 0; x < guardBlockSize; x++) { if (blockMem[x] != val) { char assertMsg[80]; // We don't print the assert message. It's here just to be helpful. - sprintf(assertMsg, "PoolAlloc: Damage %s %u byte allocation at 0x%p\n", +#if defined(_MSC_VER) + sprintf(assertMsg, "PoolAlloc: Damage %s %Iu byte allocation at 0x%p\n", + locText, size, data()); +#else + sprintf(assertMsg, "PoolAlloc: Damage %s %zu byte allocation at 0x%p\n", locText, size, data()); +#endif assert(0 && "PoolAlloc: Damage in guard block"); } } +#endif } @@ -299,4 +306,4 @@ void TAllocation::checkAllocList() const { for (const TAllocation* alloc = this; alloc != 0; alloc = alloc->prevAlloc) alloc->check(); -}
\ No newline at end of file +} |