summaryrefslogtreecommitdiffstats
path: root/generic/tkCanvText.c
diff options
context:
space:
mode:
Diffstat (limited to 'generic/tkCanvText.c')
-rw-r--r--generic/tkCanvText.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/generic/tkCanvText.c b/generic/tkCanvText.c
index ce587af..9477c63 100644
--- a/generic/tkCanvText.c
+++ b/generic/tkCanvText.c
@@ -1026,7 +1026,7 @@ TextInsert(
return;
}
- newStr = ckalloc((unsigned) textPtr->numBytes + byteCount + 1);
+ newStr = ckalloc(textPtr->numBytes + byteCount + 1);
memcpy(newStr, text, (size_t) byteIndex);
strcpy(newStr + byteIndex, string);
strcpy(newStr + byteIndex + byteCount, text + byteIndex);
@@ -1107,7 +1107,7 @@ TextDeleteChars(
byteCount = Tcl_UtfAtIndex(text + byteIndex, charsRemoved)
- (text + byteIndex);
- newStr = ckalloc((unsigned) (textPtr->numBytes + 1 - byteCount));
+ newStr = ckalloc(textPtr->numBytes + 1 - byteCount);
memcpy(newStr, text, (size_t) byteIndex);
strcpy(newStr + byteIndex, text + byteIndex + byteCount);