mirror of
https://github.com/corda/corda.git
synced 2025-01-07 13:38:47 +00:00
respect string offset in stringCharAt
This commit is contained in:
parent
ac34bc072c
commit
9cf0a42210
@ -1926,9 +1926,9 @@ stringCharAt(Thread* t, object s, int i)
|
|||||||
if (objectClass(t, data)
|
if (objectClass(t, data)
|
||||||
== arrayBody(t, t->m->types, Machine::ByteArrayType))
|
== arrayBody(t, t->m->types, Machine::ByteArrayType))
|
||||||
{
|
{
|
||||||
return byteArrayBody(t, data, i);
|
return byteArrayBody(t, data, stringOffset(t, s) + i);
|
||||||
} else {
|
} else {
|
||||||
return charArrayBody(t, data, i);
|
return charArrayBody(t, data, stringOffset(t, s) + i);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user