From: Ari Johnson Date: Tue, 20 Feb 2007 15:34:02 +0000 (+0000) Subject: @flag/add of a flag that is a unique prefix of another flag wouldn't work X-Git-Tag: 0.73~203 X-Git-Url: https://git.theari.com/?a=commitdiff_plain;h=53cfa37c89e978586ccb8868c1337319d644949c;p=cobramush.git @flag/add of a flag that is a unique prefix of another flag wouldn't work --- 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;