diff options
Diffstat (limited to 'win32/win32.c')
-rw-r--r-- | win32/win32.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/win32/win32.c b/win32/win32.c index 7f5d736c79..85daa61e88 100644 --- a/win32/win32.c +++ b/win32/win32.c @@ -6534,6 +6534,7 @@ rb_w32_write_console(uintptr_t strarg, int fd) /* assume UTF-8 */ case ENCINDEX_UTF_8: ptr = wbuffer = mbstr_to_wstr(CP_UTF8, RSTRING_PTR(str), RSTRING_LEN(str), &len); + if (!ptr) return -1L; break; case ENCINDEX_UTF_16LE: ptr = (const WCHAR *)RSTRING_PTR(str); |