From 328c9af40a13cb67d8704d90fd79940be0df3539 Mon Sep 17 00:00:00 2001 From: Markus Armbruster Date: Sat, 15 Apr 2006 10:55:19 +0000 Subject: [PATCH] (sail): There is no qsail command, remove test for it. Test the second argument only when the command is sail. Before, `unsail 42 q' showed the sailing path instead of clearing it. --- src/lib/commands/sail.c | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/src/lib/commands/sail.c b/src/lib/commands/sail.c index c1836028d..dcfcda97c 100644 --- a/src/lib/commands/sail.c +++ b/src/lib/commands/sail.c @@ -112,7 +112,7 @@ cmd_unsail_ship(struct nstr_item *nstr) static int cmd_sail_ship(struct nstr_item *nstr) { - s_char *cp; + char *cp; struct shpstr ship; char navpath[MAX_PATH_LEN]; @@ -143,7 +143,7 @@ cmd_sail_ship(struct nstr_item *nstr) int sail(void) { - s_char *cp; + char *cp; struct nstr_item nstr; if (!opt_SAIL) { @@ -153,11 +153,9 @@ sail(void) if (!snxtitem(&nstr, EF_SHIP, player->argp[1])) return RET_SYN; cp = player->argp[2]; - if ((*player->argp[0] == 'q') /*qsail command */ ||(cp && *cp == 'q')) { - return show_sail(&nstr); - } else if (*player->argp[0] == 'u' /*unsail command */ - || (cp && *cp == '-')) { + if (*player->argp[0] == 'u' || (cp && *cp == '-')) return cmd_unsail_ship(&nstr); - } else - return cmd_sail_ship(&nstr); + if (cp && *cp == 'q') + return show_sail(&nstr); + return cmd_sail_ship(&nstr); } -- 2.43.0