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 | ab67d5864e0df8affa5c02df1a523006ab312ca2 (patch) | |
| tree | 58e806d194064ae3f85d72f70adec38024b62ae4 /transcode.c | |
| parent | 5e66e5231354f12e7b570fa58a4ae53824e89103 (diff) | |
| download | ruby-ab67d5864e0df8affa5c02df1a523006ab312ca2.tar.gz ruby-ab67d5864e0df8affa5c02df1a523006ab312ca2.tar.xz ruby-ab67d5864e0df8affa5c02df1a523006ab312ca2.zip | |
* transcode.c (rb_econv_prepare_opts): initialize *opt and return 0
if opthash is nil.
git-svn-id: http://svn.ruby-lang.org/repos/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 3dfca27d0..e7c66ff42 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 || |
