From e0a364b7bf836191f25604ef9c3783be46c1ce55 Mon Sep 17 00:00:00 2001 From: richard Date: Mon, 23 Nov 2009 11:37:32 -0800 Subject: comverted mEnclosingBlockOffset from signed to unsigned to support param blocks up to 32k in size reviewed by James --- indra/llxuixml/llinitparam.cpp | 2 +- indra/llxuixml/llinitparam.h | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'indra/llxuixml') diff --git a/indra/llxuixml/llinitparam.cpp b/indra/llxuixml/llinitparam.cpp index 318a0348a2..4c050844f8 100644 --- a/indra/llxuixml/llinitparam.cpp +++ b/indra/llxuixml/llinitparam.cpp @@ -46,7 +46,7 @@ namespace LLInitParam { const U8* my_addr = reinterpret_cast(this); const U8* block_addr = reinterpret_cast(enclosing_block); - mEnclosingBlockOffset = (S16)(block_addr - my_addr); + mEnclosingBlockOffset = (U16)(my_addr - block_addr); } // diff --git a/indra/llxuixml/llinitparam.h b/indra/llxuixml/llinitparam.h index 9fb464ca7b..493ddaa378 100644 --- a/indra/llxuixml/llinitparam.h +++ b/indra/llxuixml/llinitparam.h @@ -300,14 +300,14 @@ namespace LLInitParam const U8* my_addr = reinterpret_cast(this); // get address of enclosing BLOCK class using stored offset to enclosing BaseBlock class return *const_cast( - reinterpret_cast(my_addr + (ptrdiff_t)mEnclosingBlockOffset)); + reinterpret_cast(my_addr - (ptrdiff_t)(S32)mEnclosingBlockOffset)); } private: friend class BaseBlock; bool mIsProvided; - S16 mEnclosingBlockOffset; + U16 mEnclosingBlockOffset; }; // various callbacks and constraints associated with an individual param -- cgit v1.2.3