diff options
Diffstat (limited to 'ext/tk/tcltklib.c')
-rw-r--r-- | ext/tk/tcltklib.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/ext/tk/tcltklib.c b/ext/tk/tcltklib.c index afcee3b072..e305c1327c 100644 --- a/ext/tk/tcltklib.c +++ b/ext/tk/tcltklib.c @@ -7745,7 +7745,8 @@ ip_cancel_eval_core(interp, msg, flag) if (NIL_P(msg)) { msg_obj = NULL; } else { - msg_obj = Tcl_NewStringObj(RSTRING_PTR(msg), RSTRING_LEN(msg)); + char *s = StringValuePtr(msg); + msg_obj = Tcl_NewStringObj(s, RSTRING_LENINT(msg)); Tcl_IncrRefCount(msg_obj); } |