diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2012-03-29 12:06:33 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2012-03-29 12:07:36 +0200 |
commit | 66a88dc17e91d03a130b21a511ce298dd5a52e12 (patch) | |
tree | 51d837b95391d760f815e576a1a9cc8888674a4b /registry/source/reflread.cxx | |
parent | 633cbb4954a2469f3c8911fbdffcaa4340ca6ac9 (diff) |
UNO BYTE is signed
This is hopefully a better fix for c589fa17b8f3e6ded0d1e04120781eb5d6735bc7
"Dalvik enforces byte constants being in range (-128..127)."
Diffstat (limited to 'registry/source/reflread.cxx')
-rw-r--r-- | registry/source/reflread.cxx | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/registry/source/reflread.cxx b/registry/source/reflread.cxx index cac943f58e46..e8ddab00b093 100644 --- a/registry/source/reflread.cxx +++ b/registry/source/reflread.cxx @@ -259,7 +259,7 @@ public: const sal_Char* readUTF8NameConstant(sal_uInt16 index); sal_Bool readBOOLConstant(sal_uInt16 index); - sal_uInt8 readBYTEConstant(sal_uInt16 index); + sal_Int8 readBYTEConstant(sal_uInt16 index); sal_Int16 readINT16Constant(sal_uInt16 index); sal_uInt16 readUINT16Constant(sal_uInt16 index); sal_Int32 readINT32Constant(sal_uInt16 index); @@ -367,15 +367,16 @@ sal_Bool ConstantPool::readBOOLConstant(sal_uInt16 index) return aBool; } -sal_uInt8 ConstantPool::readBYTEConstant(sal_uInt16 index) +sal_Int8 ConstantPool::readBYTEConstant(sal_uInt16 index) { - sal_uInt8 aByte = sal_False; + sal_Int8 aByte = 0; if (m_pIndex && (index> 0) && (index <= m_numOfEntries)) { if (readUINT16(m_pIndex[index - 1] + CP_OFFSET_ENTRY_TAG) == CP_TAG_CONST_BYTE) { - aByte = readBYTE(m_pIndex[index - 1] + CP_OFFSET_ENTRY_DATA); + aByte = static_cast< sal_Int8 >( + readBYTE(m_pIndex[index - 1] + CP_OFFSET_ENTRY_DATA)); } } |