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 5de5e4b commit 3af27a4Copy full SHA for 3af27a4
src/nsfns.m
@@ -3829,7 +3829,11 @@ handled fairly well by the NS libraries (displayed with distinct
3829
/* Make a Lisp string from an NSString. */
3830
- (Lisp_Object)lispString
3831
{
3832
- // make_string behaves predictably and correctly with UTF-8 input.
+ /* `make_string' creates a string with a given length, instead of
3833
+ searching for a trailing NULL byte to determine its end. This is
3834
+ important because this function is called to convert NSString
3835
+ objects containing clipboard data, which can contain NUL bytes,
3836
+ into Lisp strings. (bug#64697) */
3837
return make_string ([self UTF8String],
3838
[self lengthOfBytesUsingEncoding: NSUTF8StringEncoding]);
3839
}
0 commit comments