diff options
author | Tom de Vries <tdevries@suse.de> | 2023-05-22 16:44:56 +0200 |
---|---|---|
committer | Tom de Vries <tdevries@suse.de> | 2023-05-22 16:44:56 +0200 |
commit | 927dd36dba2d806f4e9dc68cc1975b616f4e0b57 (patch) | |
tree | 3f73f768e51b0b82cdc9a33413edf07e7b8e1666 /bfd | |
parent | 7a8a6f57eced9a8c27a93cb5c5977a33be7b1f72 (diff) | |
download | gdb-927dd36dba2d806f4e9dc68cc1975b616f4e0b57.zip gdb-927dd36dba2d806f4e9dc68cc1975b616f4e0b57.tar.gz gdb-927dd36dba2d806f4e9dc68cc1975b616f4e0b57.tar.bz2 |
[gdb/tui] Fix buglet in tui_update_variables
I noticed a buglet in tui_update_variables:
...
entry = translate (tui_border_kind, tui_border_kind_translate_lrcorner);
if (tui_border_lrcorner != (chtype) entry->value)
{
tui_border_lrcorner = (entry->value < 0) ? ACS_LRCORNER : entry->value;
...
When assigning the new value to tui_border_lrcorner, an entry->value of -1 is
taken into account, but not when comparing to the current value of
tui_border_lrcorner.
Fix this by introducing:
...
int val = (entry->value < 0) ? ACS_LRCORNER : entry->value;
...
and using this in both comparison and assignment.
Tested on x86_64-linux.
Diffstat (limited to 'bfd')
0 files changed, 0 insertions, 0 deletions