mirror of
https://github.com/darlinghq/darling-gdb.git
synced 2024-11-28 22:40:24 +00:00
* tuiStack.c (tui_make_status_line): Make sure the local buffer
is large enough to hold the complete line.
This commit is contained in:
parent
795e1e1128
commit
a42a37b725
@ -1,3 +1,8 @@
|
||||
2002-09-13 Stephane Carrez <stcarrez@nerim.fr>
|
||||
|
||||
* tuiStack.c (tui_make_status_line): Make sure the local buffer
|
||||
is large enough to hold the complete line.
|
||||
|
||||
2002-09-10 Stephane Carrez <stcarrez@nerim.fr>
|
||||
|
||||
* tui-hooks.c (tui_event_loop): New function.
|
||||
|
@ -79,8 +79,9 @@ static char*
|
||||
tui_make_status_line (TuiLocatorElement* loc)
|
||||
{
|
||||
char* string;
|
||||
char line_buf[50], buf[50], *pname;
|
||||
int status_size = termWidth ();
|
||||
char line_buf[50], *pname;
|
||||
char* buf;
|
||||
int status_size;
|
||||
int i, proc_width;
|
||||
const char* pid_name;
|
||||
const char* pc_buf;
|
||||
@ -102,8 +103,10 @@ tui_make_status_line (TuiLocatorElement* loc)
|
||||
pid_width = strlen (pid_name);
|
||||
if (pid_width > MAX_PID_WIDTH)
|
||||
pid_width = MAX_PID_WIDTH;
|
||||
|
||||
|
||||
status_size = termWidth ();
|
||||
string = (char *) xmalloc (status_size + 1);
|
||||
buf = (char*) alloca (status_size + 1);
|
||||
|
||||
/* Translate line number and obtain its size. */
|
||||
if (loc->lineNo > 0)
|
||||
|
Loading…
Reference in New Issue
Block a user