|
|
markread: use a range-check for p->pos for one item, just in case - sfeed_curses - sfeed curses UI (now part of sfeed, development is in sfeed) |
|
|
 |
git clone git://git.codemadness.org/sfeed_curses (git://git.codemadness.org) |
|
|
 |
Log |
|
|
 |
Files |
|
|
 |
Refs |
|
|
 |
README |
|
|
 |
LICENSE |
|
|
|
--- |
|
|
 |
commit 542d8132811f4c139b40613a331ad049ccffb0d7 |
|
|
 |
parent aedcc4d12d8a10a0411e82f8e002e3c08401b1bd |
|
|
 |
Author: Hiltjo Posthuma <hiltjo@codemadness.org> (mailto://) |
application/vnd.lotus-organizer |
|
|
Date: Fri, 26 Mar 2021 18:22:51 +0100 |
|
|
|
|
|
|
|
markread: use a range-check for p->pos for one item, just in case |
|
|
|
|
|
|
|
Diffstat: |
|
|
|
M sfeed_curses.c | 2 +- |
|
|
|
|
|
|
|
1 file changed, 1 insertion(+), 1 deletion(-) |
|
|
|
--- |
|
|
 |
diff --git a/sfeed_curses.c b/sfeed_curses.c |
|
|
|
@@ -1921,7 +1921,7 @@ markread(struct pane *p, off_t from, off_t to, int isread) |
|
|
|
if (!(fp = popen(cmd, "w"))) |
|
|
|
die("popen: %s", cmd); |
|
|
|
|
|
|
|
- for (i = from; i <= to; i++) { |
|
|
|
+ for (i = from; i <= to && i < p->nrows; i++) { |
|
|
|
/* do not use pane_row_get: no need for lazyload */ |
|
|
|
row = &(p->rows[i]); |
|
|
|
item = (struct item *)row->data; |
|