~mdw
/
tig
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Collect remaining string in last entry when parsing config file lines
[tig]
/
tig.c
diff --git
a/tig.c
b/tig.c
index
933d083
..
c96faae
100644
(file)
--- 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;
/* Tokenize */
while (argc < ARRAY_SIZE(argv) && (valuelen = strcspn(value, " \t"))) {
argv[argc++] = value;
-
value += valuelen;
value += valuelen;
- if (!*value)
+
+ /* Nothing more to tokenize or last available token. */
+ if (!*value || argc >= ARRAY_SIZE(argv))
break;
*value++ = 0;
break;
*value++ = 0;