ruby-changes:8209
From: nobu <ko1@a...>
Date: Fri, 10 Oct 2008 03:41:57 +0900 (JST)
Subject: [ruby-changes:8209] Ruby:r19737 (trunk): * sprintf.c (rb_str_format): check if codepoint for %c is valid.
nobu 2008-10-10 03:41:35 +0900 (Fri, 10 Oct 2008) New Revision: 19737 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=19737 Log: * sprintf.c (rb_str_format): check if codepoint for %c is valid. [ruby-dev:36691] Modified files: trunk/ChangeLog trunk/sprintf.c Index: ChangeLog =================================================================== --- ChangeLog (revision 19736) +++ ChangeLog (revision 19737) @@ -1,3 +1,8 @@ +Fri Oct 10 03:41:31 2008 Nobuyoshi Nakada <nobu@r...> + + * sprintf.c (rb_str_format): check if codepoint for %c is valid. + [ruby-dev:36691] + Fri Oct 10 01:55:48 2008 Nobuyoshi Nakada <nobu@r...> * encoding.c (enc_names): minor improvement. Index: sprintf.c =================================================================== --- sprintf.c (revision 19736) +++ sprintf.c (revision 19737) @@ -618,7 +618,7 @@ c = NUM2INT(val); } n = rb_enc_codelen(c, enc); - if (n == 0) { + if (n <= 0) { rb_raise(rb_eArgError, "invalid character"); } if (!(flags & FWIDTH)) { -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/