diff options
author | Ingo Schwarze <schwarze@openbsd.org> | 2013-10-18 23:07:23 +0000 |
---|---|---|
committer | Ingo Schwarze <schwarze@openbsd.org> | 2013-10-18 23:07:23 +0000 |
commit | 417a0e59bd9415e6984456b600930ec877216c53 (patch) | |
tree | b9c375de328aad5e8c1ae3c29e955a72b86f55d2 | |
parent | d1a737e48a31df0b4b7dea1226e51a4ad23ef97a (diff) | |
download | mandoc-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.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -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); |