Skip to content

Commit b028280

Browse files
committed
Fix bug. #47
1 parent f9f9de3 commit b028280

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

Diablo Edit2/DiabloEdit2.rc

0 Bytes
Binary file not shown.

Diablo Edit2/MetaData.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,8 @@ CPropertyMetaDataItem::CPropertyMetaDataItem(DWORD verMin, const vector<CPropert
2828
vector<int> CPropertyMetaDataItem::Parse(DWORD value) const {
2929
vector<int> ret;
3030
for (auto & f : fields_) {
31-
ret.push_back((value & f.max) + f.base);
31+
const auto MASK = (DWORD(1) << f.bits) - 1;
32+
ret.push_back((value & MASK) + f.base);
3233
value >>= f.bits;
3334
}
3435
return ret;

0 commit comments

Comments
 (0)