summaryrefslogtreecommitdiff
path: root/win32
diff options
context:
space:
mode:
authorusa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-09-11 10:08:01 +0000
committerusa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-09-11 10:08:01 +0000
commitee0a79b37f2915622a72495ea0c256428c3ddb8f (patch)
tree6c7b9782b54310ab68ad43b9acbfbd90ba725836 /win32
parentd432af3df7ffa3fb2666674f70dab685e73de374 (diff)
* win32/win32.c (rb_w32_write_console): should set writen length as the
return value. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56132 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'win32')
-rw-r--r--win32/win32.c3
1 files changed, 1 insertions, 2 deletions
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 {