summaryrefslogtreecommitdiffstats
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
commit77197c05ae8ca31c171cd1d4df3f43f0514bee41 (patch)
tree7e7a6499a4803f43beccb24811de46320fda0c32 /chars.c
parent7f134e093fe20357e6698e21ebaf05ef85a51f7a (diff)
downloadmandoc-77197c05ae8ca31c171cd1d4df3f43f0514bee41.tar.gz
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.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/chars.c b/chars.c
index c6d534d6..2dde4d5d 100644
--- a/chars.c
+++ b/chars.c
@@ -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);