aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@openbsd.org>2013-10-18 23:07:23 +0000
committerIngo Schwarze <schwarze@openbsd.org>2013-10-18 23:07:23 +0000
commit417a0e59bd9415e6984456b600930ec877216c53 (patch)
treeb9c375de328aad5e8c1ae3c29e955a72b86f55d2
parentd1a737e48a31df0b4b7dea1226e51a4ad23ef97a (diff)
downloadmandoc-417a0e59bd9415e6984456b600930ec877216c53.tar.gz
mandoc-417a0e59bd9415e6984456b600930ec877216c53.tar.zst
mandoc-417a0e59bd9415e6984456b600930ec877216c53.zip
Fix an assertion in dbindex(): Null strings are never entered into the
string table. Fortunately, they never need UTF-8 translation either.
-rw-r--r--mandocdb.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/mandocdb.c b/mandocdb.c
index b68131f9..95d511f7 100644
--- a/mandocdb.c
+++ b/mandocdb.c
@@ -1,4 +1,4 @@
-/* $Id: mandocdb.c,v 1.72 2013/10/18 21:10:07 schwarze Exp $ */
+/* $Id: mandocdb.c,v 1.73 2013/10/18 23:07:23 schwarze Exp $ */
/*
* Copyright (c) 2011, 2012 Kristaps Dzonsons <kristaps@bsd.lv>
* Copyright (c) 2011, 2012, 2013 Ingo Schwarze <schwarze@openbsd.org>
@@ -1792,7 +1792,7 @@ dbindex(struct mchars *mc, int form, const struct of *of)
return;
desc = "";
- if (NULL != of->desc) {
+ if (NULL != of->desc && '\0' != *of->desc) {
key = ohash_find(&strings,
ohash_qlookup(&strings, of->desc));
assert(NULL != key);