diff options
-rw-r--r-- | pico/pico.c | 10 | ||||
-rw-r--r-- | pith/pine.hlp | 3 |
2 files changed, 9 insertions, 4 deletions
diff --git a/pico/pico.c b/pico/pico.c index d93798c4..93d555d4 100644 --- a/pico/pico.c +++ b/pico/pico.c @@ -107,17 +107,19 @@ void remove_directions_mark(void) { LINE *lp; - int i, ll; + int i; UCS c; for(lp = lforw(curbp->b_linep); lp != curbp->b_linep; lp = lforw(lp)){ - ll = llength(lp); - for(i = 0; i < ll;){ + for(i = 0; i < llength(lp);){ c = lgetc(lp, i).c; if(c == 0x200E || c == 0x200F){ curwp->w_dotp = lp; curwp->w_doto = i; - forwdel(FALSE, 1); + if(i < llength(lp)) + forwdel(FALSE, 1); + else + llength(lp)--; direction = c == 0x200E ? 0 : 1; } else diff --git a/pith/pine.hlp b/pith/pine.hlp index fb087142..986c0ae8 100644 --- a/pith/pine.hlp +++ b/pith/pine.hlp @@ -344,6 +344,9 @@ Bugs that have been addressed include: Ulf-Dietrich Braumann. <LI> Crash when reviewing history of saving attachments. + + <LI> Crash in Pico when forwarding messages that contain a direction mark + at the end of a line. Reported by James Mingo. </UL> |