diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-07-11 05:49:22 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-07-11 05:49:22 +0000 |
commit | 3f405a768880bf6c042c072fd833d7be47162034 (patch) | |
tree | 1fdabdc80ff0c904a371a8c9c2b77c59ffced12b /ext/tk/tcltklib.c | |
parent | cb7075a6a2e57bea2c689baa79df15cccbc206b0 (diff) |
* 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
Diffstat (limited to 'ext/tk/tcltklib.c')
-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 { |