From b86250daae850bc6f456df3f520a706501347b75 Mon Sep 17 00:00:00 2001 From: Jonas Fonseca Date: Sun, 7 Oct 2007 11:53:21 +0200 Subject: [PATCH] Collect remaining string in last entry when parsing config file lines This raises the length of external commands to what fits in the command buffer (1024 characters). --- tig.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tig.c b/tig.c index 933d083..c96faae 100644 --- a/tig.c +++ b/tig.c @@ -1219,9 +1219,10 @@ set_option(char *opt, char *value) /* Tokenize */ while (argc < ARRAY_SIZE(argv) && (valuelen = strcspn(value, " \t"))) { argv[argc++] = value; - value += valuelen; - if (!*value) + + /* Nothing more to tokenize or last available token. */ + if (!*value || argc >= ARRAY_SIZE(argv)) break; *value++ = 0; -- 2.30.2