aboutsummaryrefslogtreecommitdiff
path: root/cmd-set-option.c
diff options
context:
space:
mode:
Diffstat (limited to 'cmd-set-option.c')
-rw-r--r--cmd-set-option.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/cmd-set-option.c b/cmd-set-option.c
index a3a12fb8..4c776ab9 100644
--- a/cmd-set-option.c
+++ b/cmd-set-option.c
@@ -1,4 +1,4 @@
-/* $Id: cmd-set-option.c,v 1.6 2007-10-12 12:11:40 nicm Exp $ */
+/* $Id: cmd-set-option.c,v 1.7 2007-10-12 13:51:44 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
@@ -139,7 +139,8 @@ cmd_set_option_exec(void *ptr, unused struct cmd_ctx *ctx)
ctx->error(ctx, "invalid value");
return;
}
- if (errstr != NULL || number > 7) {
+ number = screen_stringcolour(data->value);
+ if (number > 8) {
ctx->error(ctx, "bad colour: %s", data->value);
return;
}
@@ -157,7 +158,8 @@ cmd_set_option_exec(void *ptr, unused struct cmd_ctx *ctx)
ctx->error(ctx, "invalid value");
return;
}
- if (errstr != NULL || number > 7) {
+ number = screen_stringcolour(data->value);
+ if (number > 8) {
ctx->error(ctx, "bad colour: %s", data->value);
return;
}