Skip to content

Commit b72dcf6

Browse files
committed
fix(string): initWithBytes instead of UTF8 string
1 parent cc948ac commit b72dcf6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

NativeScript/runtime/ArgConverter.mm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -249,7 +249,7 @@
249249
if (type == BinaryTypeEncodingType::IdEncoding ||
250250
type == BinaryTypeEncodingType::InterfaceDeclarationReference) {
251251
std::string strValue = tns::ToString(isolate, value);
252-
id data = [NSString stringWithUTF8String:strValue.c_str()];
252+
id data = [[NSString alloc] initWithBytes:strValue.c_str() length:strValue.length() encoding:NSUTF8StringEncoding];
253253
*(CFTypeRef*)retValue = CFBridgingRetain(data);
254254
return;
255255
}

0 commit comments

Comments
 (0)