summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/actions.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/actions.c b/src/actions.c
index 4bc1b7d..3fe97a8 100644
--- a/src/actions.c
+++ b/src/actions.c
@@ -4970,8 +4970,10 @@ cmd_fdump (int interactively UNUSED, struct cmdarg **args)
int snum;
snum = ARG(0,number);
- if (snum < 0 || num_screens <= snum)
- return cmdret_new (RET_FAILURE, "fdump: invalid argument");
+ if (snum < 0)
+ return cmdret_new (RET_FAILURE, "fdump: invalid negative screen number");
+ else if (num_screens <= snum)
+ return cmdret_new (RET_FAILURE, "fdump: unknown screen");
else
{
char *s = fdump (&screens[snum]);