projects
/
cobramush.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
3d2010d
)
@flag/add of a flag that is a unique prefix of another flag wouldn't work
author
Ari Johnson
<ari@cobramush.org>
Tue, 20 Feb 2007 15:34:02 +0000
(15:34 +0000)
committer
Ari Johnson
<ari@cobramush.org>
Tue, 20 Feb 2007 15:34:02 +0000
(15:34 +0000)
src/flags.c
patch
|
blob
|
history
diff --git
a/src/flags.c
b/src/flags.c
index 5a5dfe69db997780d6a0454c508bb72573709459..a8be8971b8b486257030faed7a67f423e9475896 100644
(file)
--- 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;