* fhandler_console.cc (set_console_title): Set buffer size to
TITLESIZE + 1. Call sys_mbstowcs with correct destination length.
This commit is contained in:
parent
e2b6bacd35
commit
6359951b47
|
@ -1,3 +1,8 @@
|
||||||
|
2009-07-25 Corinna Vinschen <corinna@vinschen.de>
|
||||||
|
|
||||||
|
* fhandler_console.cc (set_console_title): Set buffer size to
|
||||||
|
TITLESIZE + 1. Call sys_mbstowcs with correct destination length.
|
||||||
|
|
||||||
2009-07-24 Christopher Faylor <me+cygwin@cgf.cx>
|
2009-07-24 Christopher Faylor <me+cygwin@cgf.cx>
|
||||||
|
|
||||||
* sigproc.h (wait_for_sigthread): Eliminate parameter.
|
* sigproc.h (wait_for_sigthread): Eliminate parameter.
|
||||||
|
|
|
@ -1892,8 +1892,8 @@ fhandler_console::set_close_on_exec (bool val)
|
||||||
void __stdcall
|
void __stdcall
|
||||||
set_console_title (char *title)
|
set_console_title (char *title)
|
||||||
{
|
{
|
||||||
wchar_t buf[257];
|
wchar_t buf[TITLESIZE + 1];
|
||||||
sys_mbstowcs (buf, sizeof buf, title);
|
sys_mbstowcs (buf, TITLESIZE + 1, title);
|
||||||
lock_ttys here (15000);
|
lock_ttys here (15000);
|
||||||
SetConsoleTitleW (buf);
|
SetConsoleTitleW (buf);
|
||||||
debug_printf ("title '%W'", buf);
|
debug_printf ("title '%W'", buf);
|
||||||
|
|
Loading…
Reference in New Issue