1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* ext/tk/tcltklib.c (get_obj_from_str): suppressed a warning.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24033 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2009-07-11 05:49:22 +00:00
parent cb7075a6a2
commit 3f405a7688

View file

@ -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 {