diff options
author | Nicholas Marriott <nicholas.marriott@gmail.com> | 2008-07-19 10:07:50 +0000 |
---|---|---|
committer | Nicholas Marriott <nicholas.marriott@gmail.com> | 2008-07-19 10:07:50 +0000 |
commit | 403b1b27ab2a4db06bbf7749c6fc20b841a34f54 (patch) | |
tree | 12cbd5b23a104a54ee1c3c144ec4a036a3dca32c /cmd-set-option.c | |
parent | 1e0cbd24ade46f16b15c10d76eda27c69ae51a0f (diff) |
Handle exact match properly.
Diffstat (limited to 'cmd-set-option.c')
-rw-r--r-- | cmd-set-option.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/cmd-set-option.c b/cmd-set-option.c index fdefe005..156e1468 100644 --- a/cmd-set-option.c +++ b/cmd-set-option.c @@ -1,4 +1,4 @@ -/* $Id: cmd-set-option.c,v 1.39 2008-07-02 21:22:57 nicm Exp $ */ +/* $Id: cmd-set-option.c,v 1.40 2008-07-19 10:07:50 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net> @@ -168,6 +168,9 @@ cmd_set_option_exec(struct cmd *self, struct cmd_ctx *ctx) } entry = &set_option_table[i]; + /* Bail now if an exact match. */ + if (strcmp(entry->name, data->option) == 0) + break; } if (entry == NULL) { ctx->error(ctx, "unknown option: %s", data->option); |