mirror of
https://github.com/corda/corda.git
synced 2025-01-06 05:04:20 +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)
|
||||
== arrayBody(t, t->m->types, Machine::ByteArrayType))
|
||||
{
|
||||
return byteArrayBody(t, data, i);
|
||||
return byteArrayBody(t, data, stringOffset(t, s) + i);
|
||||
} else {
|
||||
return charArrayBody(t, data, i);
|
||||
return charArrayBody(t, data, stringOffset(t, s) + i);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user