summaryrefslogtreecommitdiff
path: root/win32
diff options
context:
space:
mode:
Diffstat (limited to 'win32')
-rw-r--r--win32/win32.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/win32/win32.c b/win32/win32.c
index f58425f..900a9cc 100644
--- a/win32/win32.c
+++ b/win32/win32.c
@@ -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);