--- b.c.orig 2008-11-02 21:59:06.000000000 +0100 +++ b.c 2009-10-20 12:18:46.443802718 +0200 @@ -601,9 +601,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); @@ -635,9 +636,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);