From a68b271e11a0c4dae6ac881bae758c81d9c183b6 Mon Sep 17 00:00:00 2001 From: Jonas Fonseca Date: Mon, 2 Feb 2009 09:08:46 +0100 Subject: [PATCH] Fix tokenizing when parsing ~/.tigrc When moving to use argv_from_string() in set_option() a regression was introduced causing problems with parsing of multiple spaces between arguments. For example: color date yellow default Reported by Clifford Caoile. --- NEWS | 1 + tig.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/NEWS b/NEWS index d8e1468..c8d080b 100644 --- a/NEWS +++ b/NEWS @@ -24,6 +24,7 @@ Bug fixes: - Tree view: fix memory corruption bug when updating. - Fix regression for non-UTF-8 locales corrupting the view data. + - Fix regression parsing multiple spaces in ~/.tigrc. tig-0.13 -------- diff --git a/tig.c b/tig.c index 2a909b6..c569afc 100644 --- a/tig.c +++ b/tig.c @@ -292,7 +292,7 @@ argv_from_string(const char *argv[SIZEOF_ARG], int *argc, char *cmd) cmd[valuelen] = 0; argv[(*argc)++] = chomp_string(cmd); - cmd += valuelen + advance; + cmd = chomp_string(cmd + valuelen + advance); } if (*argc < SIZEOF_ARG) -- 2.30.2