aboutsummaryrefslogtreecommitdiff
path: root/usr.bin/mandoc/term_ps.c
diff options
context:
space:
mode:
authorCem Keylan <cem@ckyln.com>2020-10-19 13:43:05 +0300
committerCem Keylan <cem@ckyln.com>2020-10-19 13:43:05 +0300
commit75666cb76815ffd35a30153c6cabc53601e9e2de (patch)
tree89385348ea2708d9371704e188bcd1004d7a589a /usr.bin/mandoc/term_ps.c
parent2171aa6ddbd6f9cbec58ac40ae0b5e511d1b871a (diff)
downloadotools-75666cb76815ffd35a30153c6cabc53601e9e2de.tar.gz
usr.bin: update to 6.8
Diffstat (limited to 'usr.bin/mandoc/term_ps.c')
-rw-r--r--usr.bin/mandoc/term_ps.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/usr.bin/mandoc/term_ps.c b/usr.bin/mandoc/term_ps.c
index 9460c88..3d16520 100644
--- a/usr.bin/mandoc/term_ps.c
+++ b/usr.bin/mandoc/term_ps.c
@@ -1,7 +1,7 @@
-/* $OpenBSD: term_ps.c,v 1.55 2017/11/10 14:16:28 espie Exp $ */
+/* $OpenBSD: term_ps.c,v 1.56 2020/09/06 14:44:19 schwarze Exp $ */
/*
* Copyright (c) 2010, 2011 Kristaps Dzonsons <kristaps@bsd.lv>
- * Copyright (c) 2014, 2015, 2016, 2017 Ingo Schwarze <schwarze@openbsd.org>
+ * Copyright (c) 2014,2015,2016,2017,2020 Ingo Schwarze <schwarze@openbsd.org>
* Copyright (c) 2017 Marc Espie <espie@openbsd.org>
*
* Permission to use, copy, modify, and distribute this software for any
@@ -1248,7 +1248,10 @@ ps_endline(struct termp *p)
ps_closepage(p);
- p->tcol->offset -= p->ti;
+ if ((int)p->tcol->offset > p->ti)
+ p->tcol->offset -= p->ti;
+ else
+ p->tcol->offset = 0;
p->ti = 0;
}