|
@@ -68,7 +68,7 @@ namespace LOTRO_DAT {
|
|
// Translates T bytes from data into number using UTF-16LE encoding of the .dat file
|
|
// Translates T bytes from data into number using UTF-16LE encoding of the .dat file
|
|
template<unsigned int T>
|
|
template<unsigned int T>
|
|
long long BinaryData::ToNumber(const long long &pos) const {
|
|
long long BinaryData::ToNumber(const long long &pos) const {
|
|
- long long ans = 0;
|
|
|
|
|
|
+ unsigned long long ans = 0;
|
|
|
|
|
|
if (pos + T > size_) {
|
|
if (pos + T > size_) {
|
|
LOG(ERROR) << "Reading " << T << " bytes from " << pos << " offset with BinaryData size " << size_
|
|
LOG(ERROR) << "Reading " << T << " bytes from " << pos << " offset with BinaryData size " << size_
|
|
@@ -77,7 +77,7 @@ namespace LOTRO_DAT {
|
|
}
|
|
}
|
|
|
|
|
|
for (int i = T - 1; i >= 0; i--)
|
|
for (int i = T - 1; i >= 0; i--)
|
|
- ans = ((ans << 8ll) | data_[pos + i]);
|
|
|
|
|
|
+ ans = ((ans << 8ull) | data_[pos + i]);
|
|
|
|
|
|
return ans;
|
|
return ans;
|
|
}
|
|
}
|