Allow large paramblocks by converting mEnclosingBlockOffset to U16, needed for

location_input.xml
meow-7.2.2
James Cook 2009-11-23 10:15:00 -08:00
parent 67c832d94b
commit 83237f875c
2 changed files with 3 additions and 3 deletions

View File

@ -46,7 +46,7 @@ namespace LLInitParam
{
const U8* my_addr = reinterpret_cast<const U8*>(this);
const U8* block_addr = reinterpret_cast<const U8*>(enclosing_block);
mEnclosingBlockOffset = (S16)(block_addr - my_addr);
mEnclosingBlockOffset = (U16)(my_addr - block_addr);
}
//

View File

@ -300,14 +300,14 @@ namespace LLInitParam
const U8* my_addr = reinterpret_cast<const U8*>(this);
// get address of enclosing BLOCK class using stored offset to enclosing BaseBlock class
return *const_cast<BaseBlock*>(
reinterpret_cast<const BaseBlock*>(my_addr + (ptrdiff_t)mEnclosingBlockOffset));
reinterpret_cast<const BaseBlock*>(my_addr - (ptrdiff_t)mEnclosingBlockOffset));
}
private:
friend class BaseBlock;
bool mIsProvided;
S16 mEnclosingBlockOffset;
U16 mEnclosingBlockOffset;
};
// various callbacks and constraints associated with an individual param