We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 867f8ef commit 63ac554Copy full SHA for 63ac554
NativeScript/runtime/Interop.mm
@@ -174,7 +174,8 @@
174
} else {
175
v8::String::Utf8Value utf8Value(isolate, arg);
176
value = strdup(*utf8Value);
177
- OneByteStringResource* resource = new OneByteStringResource(value, strArg->Length());
+ auto length = strArg->Length() + 1;
178
+ OneByteStringResource* resource = new OneByteStringResource(value, length);
179
bool success = v8::String::NewExternalOneByte(isolate, resource).ToLocal(&arg);
180
tns::Assert(success, isolate);
181
}
0 commit comments