aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/term.c
diff options
context:
space:
mode:
authorKristaps Dzonsons <kristaps@bsd.lv>2011-04-30 22:24:31 +0000
committerKristaps Dzonsons <kristaps@bsd.lv>2011-04-30 22:24:31 +0000
commit4ac5d826a7fc322e357b1f87a58616c3ed2a3c5f (patch)
tree3e434f4320c7b745c5d0f5893ed63711eb48be43 /term.c
parent2d0cf7beb1dc10f2e89c1a7f207fe0f13ecd686b (diff)
downloadmandoc-4ac5d826a7fc322e357b1f87a58616c3ed2a3c5f.tar.gz
mandoc-4ac5d826a7fc322e357b1f87a58616c3ed2a3c5f.tar.zst
mandoc-4ac5d826a7fc322e357b1f87a58616c3ed2a3c5f.zip
Make mchars_num2char() return a char like it says.
Diffstat (limited to 'term.c')
-rw-r--r--term.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/term.c b/term.c
index b3c8380d..9b158e54 100644
--- a/term.c
+++ b/term.c
@@ -1,4 +1,4 @@
-/* $Id: term.c,v 1.185 2011/04/29 22:18:12 kristaps Exp $ */
+/* $Id: term.c,v 1.186 2011/04/30 22:24:31 kristaps Exp $ */
/*
* Copyright (c) 2008, 2009, 2010 Kristaps Dzonsons <kristaps@bsd.lv>
* Copyright (c) 2010, 2011 Ingo Schwarze <schwarze@openbsd.org>
@@ -348,11 +348,10 @@ term_vspace(struct termp *p)
static void
numbered(struct termp *p, const char *word, size_t len)
{
- const char *rhs;
+ char c;
- rhs = mchars_num2char(word, len);
- if (rhs)
- encode(p, rhs, 1);
+ if ('\0' != (c = mchars_num2char(word, len)))
+ encode(p, &c, 1);
}