mirror of
https://github.com/corda/corda.git
synced 2025-01-05 20:54:13 +00:00
fix thinko in stringChars
This commit is contained in:
parent
08b401f337
commit
6379f50d35
@ -102,7 +102,7 @@ GetStringChars(Thread* t, jstring s, jboolean* isCopy)
|
||||
|
||||
jchar* chars = static_cast<jchar*>
|
||||
(t->m->heap->allocate((stringLength(t, *s) + 1) * sizeof(jchar), false));
|
||||
stringChars(t, *s, reinterpret_cast<wchar_t*>(chars));
|
||||
stringChars(t, *s, chars);
|
||||
|
||||
if (isCopy) *isCopy = true;
|
||||
return chars;
|
||||
|
@ -2153,7 +2153,7 @@ stringChars(Thread* t, object string, char* chars)
|
||||
}
|
||||
|
||||
void
|
||||
stringChars(Thread* t, object string, wchar_t* chars)
|
||||
stringChars(Thread* t, object string, uint16_t* chars)
|
||||
{
|
||||
object data = stringData(t, string);
|
||||
if (objectClass(t, data)
|
||||
@ -2165,7 +2165,7 @@ stringChars(Thread* t, object string, wchar_t* chars)
|
||||
} else {
|
||||
memcpy(chars,
|
||||
&charArrayBody(t, data, stringOffset(t, string)),
|
||||
stringLength(t, string) * sizeof(wchar_t));
|
||||
stringLength(t, string) * sizeof(uint16_t));
|
||||
}
|
||||
chars[stringLength(t, string)] = 0;
|
||||
}
|
||||
|
@ -1703,7 +1703,7 @@ void
|
||||
stringChars(Thread* t, object string, char* chars);
|
||||
|
||||
void
|
||||
stringChars(Thread* t, object string, wchar_t* chars);
|
||||
stringChars(Thread* t, object string, uint16_t* chars);
|
||||
|
||||
bool
|
||||
isAssignableFrom(Thread* t, object a, object b);
|
||||
|
Loading…
Reference in New Issue
Block a user