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)
 (HTM) git clone git://git.codemadness.org/sfeed_curses
 (DIR) Log
 (DIR) Files
 (DIR) Refs
 (DIR) README
 (DIR) LICENSE
       ---
 (DIR) commit 542d8132811f4c139b40613a331ad049ccffb0d7
 (DIR) parent aedcc4d12d8a10a0411e82f8e002e3c08401b1bd
 (HTM) Author: Hiltjo Posthuma <hiltjo@codemadness.org>
       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(-)
       ---
 (DIR) 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;