SHA256
1
0
forked from pool/joe
joe/joe-3.1-fix_isblanck_argument.patch

33 lines
808 B
Diff

---
joe/b.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
Index: joe-4.1/joe/b.c
===================================================================
--- joe-4.1.orig/joe/b.c
+++ joe-4.1/joe/b.c
@@ -633,9 +633,10 @@ int piseow(P *p)
int pisblank(P *p)
{
P *q = pdup(p, "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);
@@ -667,9 +668,10 @@ off_t pisindent(P *p)
{
P *q = pdup(p, "pisindent");
off_t 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);