=================================================================== RCS file: /cvs/mandoc/roff.c,v retrieving revision 1.210 retrieving revision 1.211 diff -u -p -r1.210 -r1.211 --- mandoc/roff.c 2014/06/25 00:20:19 1.210 +++ mandoc/roff.c 2014/06/29 21:20:31 1.211 @@ -1,4 +1,4 @@ -/* $Id: roff.c,v 1.210 2014/06/25 00:20:19 schwarze Exp $ */ +/* $Id: roff.c,v 1.211 2014/06/29 21:20:31 schwarze Exp $ */ /* * Copyright (c) 2010, 2011, 2012 Kristaps Dzonsons * Copyright (c) 2010-2014 Ingo Schwarze @@ -2068,7 +2068,8 @@ roff_setstrn(struct roffkv **r, const char *name, size /* Search for an existing string with the same name. */ n = *r; - while (n && strcmp(name, n->key.p)) + while (n && (namesz != n->key.sz || + strncmp(n->key.p, name, namesz))) n = n->next; if (NULL == n) {