summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJari Vetoniemi <mailroxas@gmail.com>2019-02-24 13:34:28 +0200
committerJari Vetoniemi <mailroxas@gmail.com>2019-02-24 13:34:28 +0200
commit85360e74b094028024bb65c2f2b4e836afc1dae4 (patch)
tree4c83e0005d689cfbda19c75346747e3db632f40c
parentcd22ff6f17209982a4920d451b887131df24773e (diff)
memview: NULL on empty input
-rw-r--r--src/memview.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/memview.c b/src/memview.c
index 2d11cb7..c639099 100644
--- a/src/memview.c
+++ b/src/memview.c
@@ -737,7 +737,7 @@ input(const char *prompt)
}
out:
- return ctx.input.data;
+ return (strlen(ctx.input.data) ? ctx.input.data : NULL);
}
static void