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

* transcode.c (rb_econv_prepare_opts): initialize *opt and return 0

if opthash is nil. 


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19312 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
akr 2008-09-12 17:53:26 +00:00
parent 41d3a01486
commit 7e58885f0a
2 changed files with 9 additions and 2 deletions

View file

@ -1,3 +1,8 @@
Sat Sep 13 02:50:34 2008 Tanaka Akira <akr@fsij.org>
* transcode.c (rb_econv_prepare_opts): initialize *opt and return 0
if opthash is nil.
Sat Sep 13 02:29:19 2008 Tanaka Akira <akr@fsij.org>
* enc/trans/escape.trans: transcoder name renamed to use underscore.

View file

@ -2304,8 +2304,10 @@ rb_econv_prepare_opts(VALUE opthash, VALUE *opts)
{
int ecflags;
VALUE newhash = Qnil;
if (NIL_P(opthash))
return Qnil;
if (NIL_P(opthash)) {
*opts = Qnil;
return 0;
}
ecflags = econv_opts(opthash);
if ((ecflags & ECONV_INVALID_MASK) == ECONV_INVALID_REPLACE ||