summaryrefslogtreecommitdiff
path: root/user/libgnt/ncurses.patch
diff options
context:
space:
mode:
authorA. Wilcox <AWilcox@Wilcox-Tech.com>2024-05-29 22:01:43 -0500
committerA. Wilcox <AWilcox@Wilcox-Tech.com>2024-08-07 10:08:10 -0500
commit40a3c10c110806c88f477ac2920dc44cd0b95647 (patch)
tree85572ab8565512d843676c723783736171ba9f5c /user/libgnt/ncurses.patch
parentb44eb93f07fc2a47324c8091487184bdbe08551e (diff)
downloadpackages-40a3c10c110806c88f477ac2920dc44cd0b95647.tar.gz
packages-40a3c10c110806c88f477ac2920dc44cd0b95647.tar.bz2
packages-40a3c10c110806c88f477ac2920dc44cd0b95647.tar.xz
packages-40a3c10c110806c88f477ac2920dc44cd0b95647.zip
user/libgnt: Update to 2.14.3 and patch
Upstream has an unreleased 2.14.4 with this patch, that fixes an attempted access on an internal ncurses struct.
Diffstat (limited to 'user/libgnt/ncurses.patch')
-rw-r--r--user/libgnt/ncurses.patch62
1 files changed, 62 insertions, 0 deletions
diff --git a/user/libgnt/ncurses.patch b/user/libgnt/ncurses.patch
new file mode 100644
index 000000000..0d91c2dbf
--- /dev/null
+++ b/user/libgnt/ncurses.patch
@@ -0,0 +1,62 @@
+# HG changeset patch
+# Node ID 7c4e8ad1e3c7
+# Parent 73d8724225e7
+diff --git a/gntwm.c b/gntwm.c
+--- a/gntwm.c
++++ b/gntwm.c
+@@ -166,38 +166,40 @@
+ int sx, ex, sy, ey, w, y;
+ cchar_t ch;
+ PANEL *below = panel;
++ WINDOW *window = panel_window(panel);
+
+- sx = getbegx(panel->win);
+- ex = getmaxx(panel->win) + sx;
+- sy = getbegy(panel->win);
+- ey = getmaxy(panel->win) + sy;
++ sx = getbegx(window);
++ ex = getmaxx(window) + sx;
++ sy = getbegy(window);
++ ey = getmaxy(window) + sy;
+
+ while ((below = panel_below(below)) != NULL) {
+- if (sy > getbegy(below->win) + getmaxy(below->win) ||
+- ey < getbegy(below->win))
++ window = panel_window(below);
++ if (sy > getbegy(window) + getmaxy(window) ||
++ ey < getbegy(window))
+ continue;
+- if (sx > getbegx(below->win) + getmaxx(below->win) ||
+- ex < getbegx(below->win))
++ if (sx > getbegx(window) + getmaxx(window) ||
++ ex < getbegx(window))
+ continue;
+- for (y = MAX(sy, getbegy(below->win)); y <= MIN(ey, getbegy(below->win) + getmaxy(below->win)); y++) {
+- if (mvwin_wch(below->win, y - getbegy(below->win), sx - 1 - getbegx(below->win), &ch) != OK)
++ for (y = MAX(sy, getbegy(window)); y <= MIN(ey, getbegy(window) + getmaxy(window)); y++) {
++ if (mvwin_wch(window, y - getbegy(window), sx - 1 - getbegx(window), &ch) != OK)
+ goto right;
+ w = widestringwidth(ch.chars);
+ if (w > 1 && (ch.attr & 1)) {
+ ch.chars[0] = ' ';
+ ch.attr &= ~ A_CHARTEXT;
+- mvwadd_wch(below->win, y - getbegy(below->win), sx - 1 - getbegx(below->win), &ch);
+- touchline(below->win, y - getbegy(below->win), 1);
++ mvwadd_wch(window, y - getbegy(window), sx - 1 - getbegx(window), &ch);
++ touchline(window, y - getbegy(window), 1);
+ }
+ right:
+- if (mvwin_wch(below->win, y - getbegy(below->win), ex + 1 - getbegx(below->win), &ch) != OK)
++ if (mvwin_wch(window, y - getbegy(window), ex + 1 - getbegx(window), &ch) != OK)
+ continue;
+ w = widestringwidth(ch.chars);
+ if (w > 1 && !(ch.attr & 1)) {
+ ch.chars[0] = ' ';
+ ch.attr &= ~ A_CHARTEXT;
+- mvwadd_wch(below->win, y - getbegy(below->win), ex + 1 - getbegx(below->win), &ch);
+- touchline(below->win, y - getbegy(below->win), 1);
++ mvwadd_wch(window, y - getbegy(window), ex + 1 - getbegx(window), &ch);
++ touchline(window, y - getbegy(window), 1);
+ }
+ }
+ }