aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog5
-rw-r--r--win32/win32.c3
2 files changed, 6 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 1fd1fd9ac1..65a5489e31 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Sun Sep 11 19:06:49 2016 NAKAMURA Usaku <usa@ruby-lang.org>
+
+ * win32/win32.c (rb_w32_write_console): should set writen length as the
+ return value.
+
Fri Sep 9 22:43:29 2016 Kazuhiro NISHIYAMA <zn@mbf.nifty.com>
* gems/bundled_gems: sort lines.
diff --git a/win32/win32.c b/win32/win32.c
index db9203987f..f2a7711d2f 100644
--- a/win32/win32.c
+++ b/win32/win32.c
@@ -7119,8 +7119,7 @@ rb_w32_write_console(uintptr_t strarg, int fd)
}
reslen = 0;
if (dwMode & 4) { /* ENABLE_VIRTUAL_TERMINAL_PROCESSING */
- DWORD written;
- if (!WriteConsoleW(handle, ptr, len, &written, NULL))
+ if (!WriteConsoleW(handle, ptr, len, &reslen, NULL))
reslen = (DWORD)-1L;
}
else {