diff options
Diffstat (limited to 'compat')
-rw-r--r-- | compat/winansi.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/compat/winansi.c b/compat/winansi.c index cb725fb02f..97d84a96ed 100644 --- a/compat/winansi.c +++ b/compat/winansi.c @@ -556,7 +556,7 @@ static void detect_msys_tty(int fd) buffer, sizeof(buffer) - 2, &result))) return; name = nameinfo->Name.Buffer; - name[nameinfo->Name.Length] = 0; + name[nameinfo->Name.Length / sizeof(*name)] = 0; /* check if this could be a MSYS2 pty pipe ('msys-XXXX-ptyN-XX') */ if (!wcsstr(name, L"msys-") || !wcsstr(name, L"-pty")) |