commit 8c623936deb01a3fefa43fe9d09e3f8d88e372f0
parent b0ef37a5c0ecf44534591b76b0499fa63eb43ccf
Author: Sebastian LaVine <mail@smlavine.com>
Date: Wed, 20 Apr 2022 16:05:18 -0400
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".
Diffstat:
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git 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;