aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/chars.c
diff options
context:
space:
mode:
authorKristaps Dzonsons <kristaps@bsd.lv>2010-07-18 12:10:08 +0000
committerKristaps Dzonsons <kristaps@bsd.lv>2010-07-18 12:10:08 +0000
commit798821465f9537b4365013350ab302f462779c58 (patch)
tree2d787a4ef8df25a52bbaac96dd2b9480f36406c3 /chars.c
parent3aa5db30bfa69a5c4fefdb3ec5699b47d8b1a70a (diff)
downloadmandoc-798821465f9537b4365013350ab302f462779c58.tar.gz
mandoc-798821465f9537b4365013350ab302f462779c58.tar.zst
mandoc-798821465f9537b4365013350ab302f462779c58.zip
Clean up mandoc_special() (in order later to catch \m). It also flags
several syntactic errors that weren't caught before. Also un-puke chars.c on zero-length \[].
Diffstat (limited to 'chars.c')
-rw-r--r--chars.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/chars.c b/chars.c
index b0fcc165..25854844 100644
--- a/chars.c
+++ b/chars.c
@@ -1,4 +1,4 @@
-/* $Id: chars.c,v 1.22 2010/07/17 09:21:39 kristaps Exp $ */
+/* $Id: chars.c,v 1.23 2010/07/18 12:10:08 kristaps Exp $ */
/*
* Copyright (c) 2009 Kristaps Dzonsons <kristaps@bsd.lv>
*
@@ -195,7 +195,8 @@ find(struct tbl *tab, const char *p, size_t sz, int type)
int hash;
assert(p);
- assert(sz > 0);
+ if (0 == sz)
+ return(NULL);
if (p[0] < PRINT_LO || p[0] > PRINT_HI)
return(NULL);