diff options
author | lum <lum@cvs.openbsd.org> | 2011-11-29 05:59:55 +0000 |
---|---|---|
committer | lum <lum@cvs.openbsd.org> | 2011-11-29 05:59:55 +0000 |
commit | c1bc07b4e505bf0e75a7ec3d4f6ed5322db04d91 (patch) | |
tree | 4d113581c918b94a0d7db709989d76a6ce0cc8e0 /usr.bin | |
parent | 62dedf3f039df60c16d8279982cc117b11ad3b8d (diff) |
Missing wordlen check from version 1.20. Spotted by matthew@
Diffstat (limited to 'usr.bin')
-rw-r--r-- | usr.bin/mg/paragraph.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.bin/mg/paragraph.c b/usr.bin/mg/paragraph.c index 4d69a6f6b8d..57ce412e850 100644 --- a/usr.bin/mg/paragraph.c +++ b/usr.bin/mg/paragraph.c @@ -1,4 +1,4 @@ -/* $OpenBSD: paragraph.c,v 1.21 2011/11/28 23:37:32 matthew Exp $ */ +/* $OpenBSD: paragraph.c,v 1.22 2011/11/29 05:59:54 lum Exp $ */ /* This file is in the public domain. */ @@ -197,7 +197,7 @@ fillpara(int f, int n) curwp->w_doto == llength(curwp->w_dotp) || (c = lgetc(curwp->w_dotp, curwp->w_doto)) == ' ' || c == '\t') && (ISEOSP(wbuf[wordlen - 1]) || - (wbuf[wordlen - 1] == ')' && + (wbuf[wordlen - 1] == ')' && wordlen >= 2 && ISEOSP(wbuf[wordlen - 2]))) && wordlen < MAXWORD - 1) wbuf[wordlen++] = ' '; |