mirror of
https://github.com/libretro/devilutionX.git
synced 2026-11-13 04:34:45 -10:00
Ensure consistent types for '_pScrlSpells' and '_pISpells' operations
This commit is contained in:
1 parent
b10b4381ef
commit
c2ed83eb5e
3 files changed
+8
-12
No files matched your search
+4
-4
@@ -908,7 +908,7 @@ void CalcPlrItemVals(int p, BOOL Loadgfx)
|
||||
|
||||
// check if the current RSplType is a valid/allowed spell
|
||||
if (plr[p]._pRSplType == RSPLTYPE_CHARGES
|
||||
&& !(spl & ((unsigned __int64)1 << (plr[p]._pRSpell - 1)))) {
|
||||
&& !(spl & (1ULL << (plr[p]._pRSpell - 1)))) {
|
||||
plr[p]._pRSpell = SPL_INVALID;
|
||||
plr[p]._pRSplType = RSPLTYPE_INVALID;
|
||||
force_redraw = 255;
|
||||
@@ -1154,18 +1154,18 @@ void CalcPlrScrolls(int p)
|
||||
for (i = 0; i < plr[p]._pNumInv; i++) {
|
||||
if (plr[p].InvList[i]._itype != ITYPE_NONE && (plr[p].InvList[i]._iMiscId == IMISC_SCROLL || plr[p].InvList[i]._iMiscId == IMISC_SCROLLT)) {
|
||||
if (plr[p].InvList[i]._iStatFlag)
|
||||
plr[p]._pScrlSpells |= (__int64)1 << (plr[p].InvList[i]._iSpell - 1);
|
||||
plr[p]._pScrlSpells |= 1ULL << (plr[p].InvList[i]._iSpell - 1);
|
||||
}
|
||||
}
|
||||
|
||||
for (j = 0; j < MAXBELTITEMS; j++) {
|
||||
if (plr[p].SpdList[j]._itype != ITYPE_NONE && (plr[p].SpdList[j]._iMiscId == IMISC_SCROLL || plr[p].SpdList[j]._iMiscId == IMISC_SCROLLT)) {
|
||||
if (plr[p].SpdList[j]._iStatFlag)
|
||||
plr[p]._pScrlSpells |= (__int64)1 << (plr[p].SpdList[j]._iSpell - 1);
|
||||
plr[p]._pScrlSpells |= 1ULL << (plr[p].SpdList[j]._iSpell - 1);
|
||||
}
|
||||
}
|
||||
if (plr[p]._pRSplType == RSPLTYPE_SCROLL) {
|
||||
if (!(plr[p]._pScrlSpells & 1 << (plr[p]._pRSpell - 1))) {
|
||||
if (!(plr[p]._pScrlSpells & 1ULL << (plr[p]._pRSpell - 1))) {
|
||||
plr[p]._pRSpell = SPL_INVALID;
|
||||
plr[p]._pRSplType = RSPLTYPE_INVALID;
|
||||
force_redraw = 255;
|
||||
|
||||
Reference in new issue
Block a user