diff options
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | transcode.c | 6 |
2 files changed, 9 insertions, 2 deletions
@@ -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. 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 || |