mirror of
https://github.com/corda/corda.git
synced 2025-01-07 13:38:47 +00:00
fix GC safety bug in builtin.cpp
This commit is contained in:
parent
1d58541c87
commit
525318dabb
@ -27,6 +27,8 @@ search(Thread* t, object name, object (*op)(Thread*, object),
|
|||||||
bool replaceDots)
|
bool replaceDots)
|
||||||
{
|
{
|
||||||
if (LIKELY(name)) {
|
if (LIKELY(name)) {
|
||||||
|
PROTECT(t, name);
|
||||||
|
|
||||||
object n = makeByteArray(t, stringLength(t, name) + 1);
|
object n = makeByteArray(t, stringLength(t, name) + 1);
|
||||||
char* s = reinterpret_cast<char*>(&byteArrayBody(t, n, 0));
|
char* s = reinterpret_cast<char*>(&byteArrayBody(t, n, 0));
|
||||||
stringChars(t, name, s);
|
stringChars(t, name, s);
|
||||||
|
Loading…
Reference in New Issue
Block a user