From: Jonas Fonseca Date: Sun, 7 Oct 2007 09:53:21 +0000 (+0200) Subject: Collect remaining string in last entry when parsing config file lines X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=b86250daae850bc6f456df3f520a706501347b75;p=tig.git 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). --- 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;