Don't assume sal_Unicode is unsigned short

Change-Id: Ic025383863651f1ab70c4a819737106279d9aa1c
This commit is contained in:
Stephan Bergmann
2015-11-17 10:30:13 +01:00
parent 0ae1c6d120
commit 46bdc50066

View File

@@ -323,7 +323,7 @@ void JNI_context::java_exc_occurred() const
rtl_mem::allocate(
sizeof (rtl_uString) + (len * sizeof (sal_Unicode)) ) );
rtl_uString * ustr = reinterpret_cast<rtl_uString *>(ustr_mem.get());
m_env->GetStringRegion( static_cast<jstring>(jo_descr.get()), 0, len, ustr->buffer );
m_env->GetStringRegion( static_cast<jstring>(jo_descr.get()), 0, len, reinterpret_cast<jchar *>(ustr->buffer) );
if (m_env->ExceptionCheck())
{
m_env->ExceptionClear();
@@ -400,7 +400,7 @@ OUString JNI_context::get_stack_trace( jobject jo_exc ) const
sizeof (rtl_uString) + (len * sizeof (sal_Unicode)) ) );
rtl_uString * ustr = reinterpret_cast<rtl_uString *>(ustr_mem.get());
m_env->GetStringRegion(
static_cast<jstring>(jo_stack_trace.get()), 0, len, ustr->buffer );
static_cast<jstring>(jo_stack_trace.get()), 0, len, reinterpret_cast<jchar *>(ustr->buffer) );
if (assert_no_exception())
{
ustr->refCount = 1;