(-xProvideSelection:): Copy all characters and the terminating nul in XG_COMPOUND_TEXT handling.

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/back/trunk@17943 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Alexander Malmberg 2003-10-20 18:11:58 +00:00
parent 9c4f8ebda7
commit 478ab18b93
2 changed files with 8 additions and 2 deletions

View file

@ -1,3 +1,8 @@
2003-10-20 20:09 Alexander Malmberg <alexander@malmberg.org>
* Tools/xpbs.m (-xProvideSelection:): Copy all characters and the
terminating nul in XG_COMPOUND_TEXT handling.
2003-10-20 16:20 Alexander Malmberg <alexander@malmberg.org>
* Tools/xpbs.m (+xSelectionNotify:): Don't call XGetAtomName()

View file

@ -986,9 +986,10 @@ xErrorHandler(Display *d, XErrorEvent *e)
XCompoundTextStyle, &textProperty);
if (status == Success)
{
NSAssert(textProperty.format == 8, @"textProperty.format == 8");
numItems = textProperty.nitems;
data = malloc(numItems);
memcpy(data, textProperty.value, 1);
data = malloc(numItems + 1);
memcpy(data, textProperty.value, numItems + 1);
XFree((void *)textProperty.value);
}
}