diff options
author | Kristaps Dzonsons <kristaps@bsd.lv> | 2011-01-11 00:39:00 +0000 |
---|---|---|
committer | Kristaps Dzonsons <kristaps@bsd.lv> | 2011-01-11 00:39:00 +0000 |
commit | 5e6fd78525e0976e02b4fe2de55f0064a648cefe (patch) | |
tree | 02b803985e158fc3c4b60bb225631429edff227b | |
parent | 0fe0edf89487fb5d13d2cd07f35eecdb45e87af7 (diff) | |
download | mandoc-5e6fd78525e0976e02b4fe2de55f0064a648cefe.tar.gz mandoc-5e6fd78525e0976e02b4fe2de55f0064a648cefe.tar.zst mandoc-5e6fd78525e0976e02b4fe2de55f0064a648cefe.zip |
Don't let `in' creep past the right margin.
From an assertion noted by Brad (at comstyle).
-rw-r--r-- | man_term.c | 7 |
1 files changed, 6 insertions, 1 deletions
@@ -1,4 +1,4 @@ -/* $Id: man_term.c,v 1.94 2011/01/04 01:23:18 schwarze Exp $ */ +/* $Id: man_term.c,v 1.95 2011/01/11 00:39:00 kristaps Exp $ */ /* * Copyright (c) 2008, 2009, 2010 Kristaps Dzonsons <kristaps@bsd.lv> * Copyright (c) 2010, 2011 Ingo Schwarze <schwarze@openbsd.org> @@ -397,6 +397,11 @@ pre_in(DECL_ARGS) else p->offset = v; + /* Don't let this creep beyond the right margin. */ + + if (p->offset > p->rmargin) + p->offset = p->rmargin; + return(0); } |