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

* win32/win32.c (rb_w32_conv_from_wchar): follow nobu's previous commit.

hey nobu, why don't you write Changelog for such serious changes?


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46324 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
usa 2014-06-02 22:35:17 +00:00
parent 0fec24f972
commit 25e8bfce58

View file

@ -2049,7 +2049,7 @@ rb_w32_conv_from_wchar(const WCHAR *wstr, rb_encoding *enc)
{
VALUE src;
long len = lstrlenW(wstr);
int encindex = ENC_TO_ENCINDEX(enc);
int encindex = rb_enc_to_index(enc);
if (encindex == ENCINDEX_UTF_16LE) {
return rb_enc_str_new((char *)wstr, len * sizeof(WCHAR), enc);