From 53cfa37c89e978586ccb8868c1337319d644949c Mon Sep 17 00:00:00 2001 From: Ari Johnson Date: Tue, 20 Feb 2007 15:34:02 +0000 Subject: [PATCH] @flag/add of a flag that is a unique prefix of another flag wouldn't work --- src/flags.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/flags.c b/src/flags.c index 5a5dfe6..a8be897 100644 --- a/src/flags.c +++ b/src/flags.c @@ -1917,8 +1917,10 @@ add_flag(const char *name, const char letter, int type, FLAGSPACE *n; n = hashfind("FLAG", &htab_flagspaces); /* Don't double-add */ - if ((f = match_flag_ns(n, strupper(name)))) - return f; + if ((f = match_flag_ns(n, strupper(name)))) { + if (strcasecmp(f->name, name) == 0) + return f; + } f = new_flag(); f->name = mush_strdup(strupper(name), "flag name"); f->letter = letter; -- 2.30.2