diff options
author | mitchell <unknown> | 2018-04-29 09:07:15 -0400 |
---|---|---|
committer | mitchell <unknown> | 2018-04-29 09:07:15 -0400 |
commit | c4e0a496cfb8d55cf439ccab4faf9aa71e8b70f7 (patch) | |
tree | 568303c4052c3f318ffa1c33647f4eedd459e7e1 | |
parent | 6dc8a9652f08ea7eb0d9835939bdb7735b0d1d89 (diff) | |
download | scintilla-mirror-c4e0a496cfb8d55cf439ccab4faf9aa71e8b70f7.tar.gz |
Fixed potential crashes in curses platform with newer versions of ncurses.
-rw-r--r-- | curses/ScintillaCurses.cxx | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/curses/ScintillaCurses.cxx b/curses/ScintillaCurses.cxx index d09f04b69..af55a3b62 100644 --- a/curses/ScintillaCurses.cxx +++ b/curses/ScintillaCurses.cxx @@ -337,8 +337,8 @@ public: int flags) { for (int x = rc.left, y = rc.top - 1; x < rc.right; x++) { attr_t attrs = mvwinch(win, y, x) & A_ATTRIBUTES; - short pair = PAIR_NUMBER(attrs), fore = COLOR_WHITE; - if (pair > 0) pair_content(pair, &fore, NULL); + short pair = PAIR_NUMBER(attrs), fore, unused; + if (pair > 0) pair_content(pair, &fore, &unused); mvwchgat(win, y, x, 1, attrs, term_color_pair(fore, fill), NULL); } } @@ -420,8 +420,8 @@ public: const char *s, int len, ColourDesired fore) { if ((int)rc.top >= getmaxy(win) - 1) return; attr_t attrs = mvwinch(win, (int)rc.top, (int)rc.left); - short pair = PAIR_NUMBER(attrs), back = COLOR_BLACK; - if (pair > 0) pair_content(pair, NULL, &back); + short pair = PAIR_NUMBER(attrs), unused, back; + if (pair > 0) pair_content(pair, &unused, &back); DrawTextNoClip(rc, font_, ybase, s, len, fore, SCI_COLORS[back]); } /** |