diff options
author | zeertzjq <zeertzjq@outlook.com> | 2023-02-28 07:19:03 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-02-28 07:19:03 +0800 |
commit | 2630341db65772e0a636c2a1cfbd6bba8ca9b28d (patch) | |
tree | 2ffeb0efc6bead3304fa0b3229a70ec0449e3a03 /src | |
parent | fb2ead6cf3ef2d5a60af5dbe9cd1443a07296beb (diff) | |
download | rneovim-2630341db65772e0a636c2a1cfbd6bba8ca9b28d.tar.gz rneovim-2630341db65772e0a636c2a1cfbd6bba8ca9b28d.tar.bz2 rneovim-2630341db65772e0a636c2a1cfbd6bba8ca9b28d.zip |
fix(tui): avoid stack-use-after-scope with cursor color (#22435)
Diffstat (limited to 'src')
-rw-r--r-- | src/nvim/tui/tui.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/nvim/tui/tui.c b/src/nvim/tui/tui.c index fee1d21672..48dc860ebd 100644 --- a/src/nvim/tui/tui.c +++ b/src/nvim/tui/tui.c @@ -1109,8 +1109,8 @@ void tui_set_mode(TUIData *tui, ModeShape mode) // Hopefully the user's default cursor color is inverse. unibi_out_ext(tui, tui->unibi_ext.reset_cursor_color); } else { + char hexbuf[8]; if (tui->set_cursor_color_as_str) { - char hexbuf[8]; snprintf(hexbuf, 7 + 1, "#%06x", aep.rgb_bg_color); UNIBI_SET_STR_VAR(tui->params[0], hexbuf); } else { |