From d3125e3e43d39d847c766f0f56e6a1e9501694ea Mon Sep 17 00:00:00 2001 From: shugo Date: Fri, 21 Jan 2005 05:02:16 +0000 Subject: * lib/net/imap.rb (u8tou16): fixed typo. fixed: [ruby-lis:40546] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7797 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- lib/net/imap.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/net') diff --git a/lib/net/imap.rb b/lib/net/imap.rb index 0a992844d4..102a0184e4 100644 --- a/lib/net/imap.rb +++ b/lib/net/imap.rb @@ -1266,7 +1266,7 @@ module Net buf.concat(c) i += 1 elsif (c & 0xe0) == 0xc0 && - inlen >= 2 && + len >= 2 && (s[i + 1] & 0xc0) == 0x80 if c == 0xc0 || c == 0xc1 raise DataFormatError, format("non-shortest UTF-8 sequence (%02x)", c) -- cgit v1.2.3