From cef3abbdf7aaa67b6d2d28bd932a5e252a9d524c Mon Sep 17 00:00:00 2001 From: Marc Mezzarobba Date: Wed, 14 May 2025 19:16:22 +0200 Subject: [PATCH] gr_set_str with duplicate generator names (ter) Fix some nonsense code I accidentally introduced in #2283. --- src/gr_generic/set_str_expr.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/gr_generic/set_str_expr.c b/src/gr_generic/set_str_expr.c index 656dd67479..b46f23f484 100644 --- a/src/gr_generic/set_str_expr.c +++ b/src/gr_generic/set_str_expr.c @@ -244,8 +244,8 @@ int _gr_parse_check_duplicates(gr_parse_t E) int ok = 1; for (slong k = 1; k < E->terminals_len; k++) { - if (!strncmp(names[k-1].str, E->terminal_strings[k].str, - names[k-1].str_len)) + if (names[k].str_len == names[k - 1].str_len && + !strncmp(names[k - 1].str, names[k].str, names[k-1].str_len)) { ok = 0; break;