mirror of
https://github.com/glest/glest-source.git
synced 2025-08-30 19:29:47 +02:00
- added more crc capture data to track down oos
This commit is contained in:
@@ -53,6 +53,7 @@ public:
|
||||
uint32 addBytes(const void *_data, size_t _size);
|
||||
void addString(const string &value);
|
||||
uint32 addInt(const int32 &value);
|
||||
uint32 addUInt(const uint32 &value);
|
||||
uint32 addInt64(const int64 &value);
|
||||
void addFile(const string &path);
|
||||
|
||||
|
@@ -128,6 +128,19 @@ uint32 Checksum::addInt(const int32 &value) {
|
||||
return sum;
|
||||
}
|
||||
|
||||
uint32 Checksum::addUInt(const uint32 &value) {
|
||||
int8 byte = (value >> 0) & 0xFF;
|
||||
addByte(byte);
|
||||
byte = (value >> 8) & 0xFF;
|
||||
addByte(byte);
|
||||
byte = (value >> 16) & 0xFF;
|
||||
addByte(byte);
|
||||
byte = (value >> 24) & 0xFF;
|
||||
addByte(byte);
|
||||
|
||||
return sum;
|
||||
}
|
||||
|
||||
uint32 Checksum::addInt64(const int64 &value) {
|
||||
int8 byte = (value >> 0) & 0xFF;
|
||||
addByte(byte);
|
||||
|
Reference in New Issue
Block a user