1
0
Fork 0
mirror of https://git.sr.ht/~sircmpwn/gmni synced 2024-05-07 13:36:03 +02:00

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".
This commit is contained in:
Sebastian LaVine 2022-04-20 16:05:18 -04:00 committed by Drew DeVault
parent b0ef37a5c0
commit 8c623936de

View File

@ -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;