diff options
author | Bram Moolenaar <Bram@vim.org> | 2021-10-17 11:33:47 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2021-10-17 11:33:47 +0100 |
commit | 9d4b8caf9eddb2db09395587c621309f4513befa (patch) | |
tree | dd15295c3302eba234a3f12f225c3e87223be9e4 /src/gui_gtk_x11.c | |
parent | 40bd5a15405206b130d487af0ca61b5d9b5859f8 (diff) | |
download | vim-git-9d4b8caf9eddb2db09395587c621309f4513befa.tar.gz |
patch 8.2.3527: gcc complains about uninitialized variablev8.2.3527
Problem: Gcc complains about uninitialized variable. (Tony Mechelynck)
Solution: Initialize it.
Diffstat (limited to 'src/gui_gtk_x11.c')
-rw-r--r-- | src/gui_gtk_x11.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/gui_gtk_x11.c b/src/gui_gtk_x11.c index c55d9792b..e107c5e06 100644 --- a/src/gui_gtk_x11.c +++ b/src/gui_gtk_x11.c @@ -5605,7 +5605,7 @@ gui_gtk2_draw_string(int row, int col, char_u *s, int len, int flags) int byte_sum; // byte position in string char_u *cs; // current *s pointer int needs_pango; // look ahead, 0=ascii 1=unicode/ligatures - int should_need_pango; + int should_need_pango = FALSE; int slen; int is_ligature; int next_is_ligature; @@ -5743,6 +5743,7 @@ gui_gtk2_draw_string(int row, int col, char_u *s, int len, int flags) slen++; // ascii } } + // temporarily zero terminate substring, print, restore char, wrap backup_ch = *(cs + slen); *(cs + slen) = 0; |