From d8a9d9ca36fd9b286301cf4c3b9818b718d250a3 Mon Sep 17 00:00:00 2001 From: nobu Date: Sat, 11 Jul 2009 05:49:22 +0000 Subject: * ext/tk/tcltklib.c (get_obj_from_str): suppressed a warning. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@24033 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ext/tk/tcltklib.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'ext') diff --git a/ext/tk/tcltklib.c b/ext/tk/tcltklib.c index fe199ef48..39c85da72 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 { -- cgit