aboutsummaryrefslogtreecommitdiffstats
path: root/src/nnn.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/nnn.c')
-rw-r--r--src/nnn.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/nnn.c b/src/nnn.c
index a8f82ed..ef20b13 100644
--- a/src/nnn.c
+++ b/src/nnn.c
@@ -4326,9 +4326,11 @@ static void readpipe(int fd, char **path, char **lastname, char **lastdir)
if (g_buf[0] == '+')
ctx = (char)(get_free_ctx() + 1);
+ else if (g_buf[0] < '0')
+ return;
else {
ctx = g_buf[0] - '0';
- if (ctx < 0 || ctx > CTX_MAX)
+ if (ctx > CTX_MAX)
return;
}