From 8c623936deb01a3fefa43fe9d09e3f8d88e372f0 Mon Sep 17 00:00:00 2001 From: Sebastian LaVine Date: Wed, 20 Apr 2022 16:05:18 -0400 Subject: [PATCH] gmni: fix -d truncation Previously, the last character of the provided input would not be read. For example, `gmni -d termfmt gemini://godocs.io/-/search` would search for "termfm". --- src/gmni.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gmni.c b/src/gmni.c index ff6c619..f50733b 100644 --- a/src/gmni.c +++ b/src/gmni.c @@ -189,7 +189,7 @@ main(int argc, char *argv[]) break; case 'd': input_mode = INPUT_READ; - input_source = fmemopen(optarg, strlen(optarg), "r"); + input_source = fmemopen(optarg, strlen(optarg) + 1, "r"); break; case 'D': input_mode = INPUT_READ;