=================================================================== RCS file: /cvs/mandoc/Attic/ascii.c,v retrieving revision 1.4 retrieving revision 1.6 diff -u -p -r1.4 -r1.6 --- mandoc/Attic/ascii.c 2009/03/20 21:58:38 1.4 +++ mandoc/Attic/ascii.c 2009/04/12 19:19:57 1.6 @@ -1,4 +1,4 @@ -/* $Id: ascii.c,v 1.4 2009/03/20 21:58:38 kristaps Exp $ */ +/* $Id: ascii.c,v 1.6 2009/04/12 19:19:57 kristaps Exp $ */ /* * Copyright (c) 2009 Kristaps Dzonsons * @@ -26,12 +26,6 @@ #define ASCII_PRINT_HI 126 #define ASCII_PRINT_LO 32 -/* - * Lookup and hashing routines for constructing the ASCII symbol table, - * which should contain a significant portion of mdoc(7)'s special - * symbols. - */ - struct line { const char *code; const char *out; @@ -143,7 +137,10 @@ term_a2ascii(void *arg, const char *p, size_t sz, size assert(p); assert(sz > 0); - assert(p[0] >= ASCII_PRINT_LO && p[0] <= ASCII_PRINT_HI); + + if (p[0] < ASCII_PRINT_LO || p[0] > ASCII_PRINT_HI) + return(NULL); + /* * Lookup the symbol in the symbol hash. See ascii2htab for the