Index: joe-4.0/joe/b.c =================================================================== --- joe-4.0.orig/joe/b.c +++ joe-4.0/joe/b.c @@ -626,9 +626,10 @@ int piseow(P *p) int pisblank(P *p) { P *q = pdup(p, USTR "pisblank"); + int brc_result; p_goto_bol(q); - while (joe_isblank(p->b->o.charmap,brc(q))) + while (((brc_result = brc(q)) != MAXINT) && joe_isblank(p->b->o.charmap,brc(q))) pgetb(q); if (piseol(q)) { prm(q); @@ -660,9 +661,10 @@ long pisindent(P *p) { P *q = pdup(p, USTR "pisindent"); long col; + int brc_result; p_goto_bol(q); - while (joe_isblank(p->b->o.charmap,brc(q))) + while (((brc_result = brc(q)) != MAXINT) && joe_isblank(p->b->o.charmap,brc(q))) pgetc(q); col = q->col; prm(q);