summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorfvogel <fvogelnew1@free.fr>2017-06-26 12:48:04 (GMT)
committerfvogel <fvogelnew1@free.fr>2017-06-26 12:48:04 (GMT)
commit04847e469db03faa027794a0aba5a111dd1d6990 (patch)
tree40f00aa0a8d606c8d01b4a66c017b122c8352cb3
parentd128e0a7530de671cd860738c7f5a8c7c0daa30a (diff)
downloadtk-04847e469db03faa027794a0aba5a111dd1d6990.zip
tk-04847e469db03faa027794a0aba5a111dd1d6990.tar.gz
tk-04847e469db03faa027794a0aba5a111dd1d6990.tar.bz2
Fix [62c5b7a1d7]: [text] segfaults on replace. Patch from Christian Werner.
-rw-r--r--generic/tkText.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/generic/tkText.c b/generic/tkText.c
index 6ff1db9..e0dcc50 100644
--- a/generic/tkText.c
+++ b/generic/tkText.c
@@ -1491,6 +1491,7 @@ TextWidgetObjCmd(
* Move the insertion position to the correct place.
*/
+ indexFromPtr = TkTextGetIndexFromObj(interp, textPtr, objv[2]);
TkTextIndexForwChars(NULL, indexFromPtr,
deleteInsertOffset, &index, COUNT_INDICES);
TkBTreeUnlinkSegment(textPtr->insertMarkPtr,