From 3bf6e9ca0558b398666459c760b7fedce56bfc7e Mon Sep 17 00:00:00 2001 From: Markus Armbruster Date: Tue, 3 Feb 2004 17:24:05 +0000 Subject: [PATCH] (map): Reject flags `t' and `r' unless it's a bmap command. Both used to change the map command into the corresponding bmap command, which was undocumented and didn't make sense. From Marc Olzheim. --- src/lib/commands/map.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/lib/commands/map.c b/src/lib/commands/map.c index 40680750..a777f55e 100644 --- a/src/lib/commands/map.c +++ b/src/lib/commands/map.c @@ -138,14 +138,19 @@ map(void) where = 2; break; case 't': + if (!bmap) + goto bad_flag; bmap = EF_MAP; *(b + 1) = 0; break; case 'r': + if (!bmap) + goto bad_flag; bmap = EF_MAP + EF_BMAP; *(b + 1) = 0; break; default: + bad_flag: pr("Bad flag %c!\n", *b); break; }