[Bug #18955] Check length of argument for %c in proper encoding

This commit is contained in:
Nobuyoshi Nakada 2022-08-20 00:16:43 +09:00
parent 4177f60eed
commit ce384ef5a9
Notes: git 2025-04-09 13:49:37 +00:00
2 changed files with 5 additions and 2 deletions

View file

@ -892,6 +892,8 @@ class TestM17N < Test::Unit::TestCase
assert_raise(Encoding::CompatibilityError) {
"%s%s" % [s("\xc2\xa1"), e("\xc2\xa1")]
}
"%c" % "\u3042".encode('Windows-31J')
end
def test_sprintf_p