mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-21 02:24:17 +08:00
Don't fill regs window with a negative number of spaces
Function n_spaces can't handle negative values, and returns an invalid pointer in this case. gdb/ChangeLog: 2021-02-07 Hannes Domani <ssbssa@yahoo.de> * tui/tui-regs.c (tui_data_item_window::rerender): Don't call n_spaces with a negative value.
This commit is contained in:
@ -1,3 +1,8 @@
|
|||||||
|
2021-02-07 Hannes Domani <ssbssa@yahoo.de>
|
||||||
|
|
||||||
|
* tui/tui-regs.c (tui_data_item_window::rerender): Don't call
|
||||||
|
n_spaces with a negative value.
|
||||||
|
|
||||||
2021-02-07 Hannes Domani <ssbssa@yahoo.de>
|
2021-02-07 Hannes Domani <ssbssa@yahoo.de>
|
||||||
|
|
||||||
* tui/tui-regs.c (tui_data_window::display_registers_from):
|
* tui/tui-regs.c (tui_data_window::display_registers_from):
|
||||||
|
@ -492,7 +492,8 @@ tui_data_item_window::rerender (WINDOW *handle, int field_width)
|
|||||||
(void) wstandout (handle);
|
(void) wstandout (handle);
|
||||||
|
|
||||||
mvwaddnstr (handle, y, x, content.c_str (), field_width - 1);
|
mvwaddnstr (handle, y, x, content.c_str (), field_width - 1);
|
||||||
waddstr (handle, n_spaces (field_width - content.size ()));
|
if (content.size () < field_width)
|
||||||
|
waddstr (handle, n_spaces (field_width - content.size ()));
|
||||||
|
|
||||||
if (highlight)
|
if (highlight)
|
||||||
/* We ignore the return value, casting it to void in order to avoid
|
/* We ignore the return value, casting it to void in order to avoid
|
||||||
|
Reference in New Issue
Block a user