diff options
author | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-09-12 17:53:26 +0000 |
---|---|---|
committer | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-09-12 17:53:26 +0000 |
commit | 7e58885f0a56202349291ba738efe6a1d0dc531e (patch) | |
tree | 58e806d194064ae3f85d72f70adec38024b62ae4 /transcode.c | |
parent | 41d3a0148637725fc6078b4bdfadae290ff0d39e (diff) |
* 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
Diffstat (limited to 'transcode.c')
-rw-r--r-- | transcode.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/transcode.c b/transcode.c index 3dfca27d01..e7c66ff425 100644 --- a/transcode.c +++ b/transcode.c @@ -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 || |