SHA256
1
0
forked from pool/joe
joe/joe-3.1-fix_isblanck_argument.patch
2009-10-26 15:55:32 +00:00

27 lines
697 B
Diff

--- 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);