mirror of
https://github.com/glest/glest-source.git
synced 2025-08-20 07:01:21 +02:00
Test for fixing OOS checks
This commit is contained in:
@@ -2262,18 +2262,17 @@ namespace Shared {
|
|||||||
#ifndef _DISABLE_MEMORY_VAULT_CHECKS
|
#ifndef _DISABLE_MEMORY_VAULT_CHECKS
|
||||||
Checksum checksum;
|
Checksum checksum;
|
||||||
vaultList[ptr] = checksum.addInt(value);
|
vaultList[ptr] = checksum.addInt(value);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void ValueCheckerVault::checkItemInVault(const void *ptr, int value) const {
|
void ValueCheckerVault::checkItemInVault(const void *ptr, int value) const {
|
||||||
#ifndef _DISABLE_MEMORY_VAULT_CHECKS
|
#ifndef _DISABLE_MEMORY_VAULT_CHECKS
|
||||||
map<const void *, uint32>::const_iterator iterFind = vaultList.find(ptr);
|
map<const void *, uint32>::const_iterator iterFind = vaultList.find(ptr);
|
||||||
if (iterFind == vaultList.end())
|
if (iterFind != vaultList.end()) {
|
||||||
notifyValueChangedUnexpectedly();
|
Checksum checksum;
|
||||||
Checksum checksum;
|
if (iterFind->second != checksum.addInt(value))
|
||||||
if (iterFind->second != checksum.addInt(value))
|
notifyValueChangedUnexpectedly();
|
||||||
notifyValueChangedUnexpectedly();
|
}
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user