aboutsummaryrefslogtreecommitdiffstats
path: root/win32/win32.c
diff options
context:
space:
mode:
Diffstat (limited to 'win32/win32.c')
-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 {