summaryrefslogtreecommitdiffstats
path: root/generic/tkSelect.c
diff options
context:
space:
mode:
Diffstat (limited to 'generic/tkSelect.c')
-rw-r--r--generic/tkSelect.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/generic/tkSelect.c b/generic/tkSelect.c
index 85865de..b2dd0d9 100644
--- a/generic/tkSelect.c
+++ b/generic/tkSelect.c
@@ -1508,7 +1508,7 @@ TkSelDefaultSelection(
Tcl_DStringFree(&ds);
return -1;
}
- memcpy(buffer, Tcl_DStringValue(&ds), (unsigned) (1+length));
+ memcpy(buffer, Tcl_DStringValue(&ds), length + 1);
Tcl_DStringFree(&ds);
*typePtr = XA_ATOM;
return length;