diff options
Diffstat (limited to 'ext')
-rw-r--r-- | ext/tk/tcltklib.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/tk/tcltklib.c b/ext/tk/tcltklib.c index fe199ef483..39c85da72d 100644 --- a/ext/tk/tcltklib.c +++ b/ext/tk/tcltklib.c @@ -6132,7 +6132,7 @@ get_obj_from_str(str) /* binary string */ return Tcl_NewByteArrayObj((const unsigned char *)s, RSTRING_LEN(str)); #endif - } else if (strlen(s) != RSTRING_LEN(str)) { + } else if (memchr(s, 0, RSTRING_LEN(str))) { /* probably binary string */ return Tcl_NewByteArrayObj((const unsigned char *)s, RSTRING_LEN(str)); } else { |