mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-22 02:33:03 +00:00
uniqstr: fix assertion
* src/uniqstr.c (uniqstr_assert): Really make sure str is a uniqstr, not just whether some uniqstr with the same content was registered.
This commit is contained in:
committed by
Akim Demaille
parent
c4aa4ff541
commit
b663fd5322
@@ -77,7 +77,8 @@ uniqstr_vsprintf (char const *format, ...)
|
|||||||
void
|
void
|
||||||
uniqstr_assert (char const *str)
|
uniqstr_assert (char const *str)
|
||||||
{
|
{
|
||||||
if (!hash_lookup (uniqstrs_table, str))
|
uniqstr *s = hash_lookup (uniqstrs_table, str);
|
||||||
|
if (!s || s != (uniqstr *)str)
|
||||||
{
|
{
|
||||||
error (0, 0,
|
error (0, 0,
|
||||||
"not a uniqstr: %s", quotearg (str));
|
"not a uniqstr: %s", quotearg (str));
|
||||||
|
|||||||
Reference in New Issue
Block a user