diff options
author | YO4 (Yoshinao Muramatsu) <ysno@ac.auone-net.jp> | 2021-02-20 00:48:46 +0900 |
---|---|---|
committer | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2021-02-20 00:50:57 +0900 |
commit | b94b7965c420661ed621c146a4efaf43bc3cf50b (patch) | |
tree | 48e3de612c1479fb8668e90b0141ec3c3267434e /win32/win32.c | |
parent | a319c048187bb32677730a6c6e5a1a0fce7fad36 (diff) | |
download | ruby-b94b7965c420661ed621c146a4efaf43bc3cf50b.tar.gz |
Fixed fallback ENABLE_VIRTUAL_TERMINAL_PROCESSING value [Bug #17639]
Diffstat (limited to 'win32/win32.c')
-rw-r--r-- | win32/win32.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/win32/win32.c b/win32/win32.c index b5d982b657..8f99805a5d 100644 --- a/win32/win32.c +++ b/win32/win32.c @@ -2693,7 +2693,7 @@ init_stdhandle(void) DWORD m; if (GetConsoleMode(h, &m)) { #ifndef ENABLE_VIRTUAL_TERMINAL_PROCESSING -#define ENABLE_VIRTUAL_TERMINAL_PROCESSING 0x200 +#define ENABLE_VIRTUAL_TERMINAL_PROCESSING 0x4 #endif SetConsoleMode(h, m | ENABLE_VIRTUAL_TERMINAL_PROCESSING); } @@ -7286,7 +7286,7 @@ rb_w32_write_console(uintptr_t strarg, int fd) break; } reslen = 0; - if (dwMode & 4) { /* ENABLE_VIRTUAL_TERMINAL_PROCESSING */ + if (dwMode & ENABLE_VIRTUAL_TERMINAL_PROCESSING) { if (!WriteConsoleW(handle, ptr, len, &reslen, NULL)) reslen = (DWORD)-1L; } |