We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 091e6a9 commit d4b2e3cCopy full SHA for d4b2e3c
orbisFSTool/OrbisFSFile.cpp
@@ -67,9 +67,8 @@ uint8_t *OrbisFSFile::getDataBlock(uint32_t num){
67
/*
68
Stage 3 lookup
69
*/
70
- uint64_t linkElemsPerStage2 = (uint64_t)linkElemsPerPage * (uint64_t)linkElemsPerPage;
71
- retassure(num < linkElemsPerStage2, "Trying to access out of bounds block on stage 3 lookup");
72
uint32_t stage3Idx = num / linkElemsPerPage;
+ retassure(stage3Idx < linkElemsPerPage, "Trying to access out of bounds block on stage 3 lookup");
73
num %= linkElemsPerPage;
74
fat = &fat[stage3Idx];
75
retassure(fat->type == ORBIS_FS_CHAINLINK_TYPE_LINK, "bad dataLnk type 0x%02x in stage 3 lookup",fat->type);
0 commit comments