Created
July 25, 2019 07:45
-
-
Save hamano/e43624c6bda2250cb4a0c8116926c7f5 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- mlterm-3.8.8.orig/uitoolkit/ui_im_candidate_screen.c | |
+++ mlterm-3.8.8/uitoolkit/ui_im_candidate_screen.c | |
@@ -83,7 +83,7 @@ static u_int candidate_width(ui_font_man | |
width = 0; | |
ui_font_manager_set_attr(font_man, 0, 0); | |
- for (i = 0; i < candidate->filled_len; i++) { | |
+ for (i = 0; i < candidate->num_chars; i++) { | |
ui_font_t *font; | |
font = ui_get_font(font_man, vt_char_font(&candidate->chars[i])); | |
@@ -320,7 +320,7 @@ static void draw_screen_vertical(ui_im_c | |
* |1 cand0 | | |
* ^^^^^ | |
*/ | |
- draw_str(cand_screen, cand_screen->candidates[i].chars, cand_screen->candidates[i].filled_len, | |
+ draw_str(cand_screen, cand_screen->candidates[i].chars, cand_screen->candidates[i].num_chars, | |
font->width * (num_digits + 1), i - top, font->height, font->ascent, 1); | |
} | |
@@ -760,7 +760,7 @@ static int select_candidate(ui_im_candid | |
cand = &cand_screen->candidates[cand_screen->index]; | |
if (cand->chars) { | |
- for (i = 0; i < cand->filled_len; i++) { | |
+ for (i = 0; i < cand->num_chars; i++) { | |
vt_char_set_fg_color(&cand->chars[i], VT_FG_COLOR); | |
vt_char_set_bg_color(&cand->chars[i], VT_BG_COLOR); | |
} | |
@@ -769,7 +769,7 @@ static int select_candidate(ui_im_candid | |
cand = &cand_screen->candidates[index]; | |
if (cand->chars) { | |
- for (i = 0; i < cand->filled_len; i++) { | |
+ for (i = 0; i < cand->num_chars; i++) { | |
vt_char_set_fg_color(&cand->chars[i], VT_BG_COLOR); | |
vt_char_set_bg_color(&cand->chars[i], VT_FG_COLOR); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
backtraceです、これ以外にも同様のnullアクセスがありました。