diff options
author | Sebastian Harl <sh@tokkee.org> | 2009-02-13 14:10:26 +0100 |
---|---|---|
committer | Jonas Fonseca <fonseca@diku.dk> | 2009-02-13 14:32:56 +0100 |
commit | b43e701fc529bbc22f7669a3029c9aa8c5cf2dcb (patch) | |
tree | e96ca55ae2052ec0952e04c7cf82d7fbb7df5f99 | |
parent | 7b507b4156865c87a78f9ae8b22267264b9f9083 (diff) |
Fix handling of quoted strings in the config file
parse_string() adapts the string length to automatically remove quotation
marks when copying the string. However, when calling string_ncopy_do()
strlen(arg) used to be called again instead of using the adapted value.
This e.g. led to wrong locale settings when using
set commit-encoding = "UTF-8"
and thus a slightly messed up display.
Thanks to Gerfried Fuchs for reporting this.
Signed-off-by: Sebastian Harl <sh@tokkee.org>
Signed-off-by: Jonas Fonseca <fonseca@diku.dk>
-rw-r--r-- | NEWS | 1 | ||||
-rw-r--r-- | tig.c | 2 |
2 files changed, 2 insertions, 1 deletions
@@ -19,6 +19,7 @@ Bug fixes: - Blame view: fix problem with uninitialized variable. - Blame view: use line number information when loading blame for specific commit. + - Fix handling of quoted strings in the config file. tig-0.14 -------- @@ -1470,7 +1470,7 @@ parse_string(char *opt, const char *arg, size_t optsize) } arg += 1; arglen -= 2; default: - string_ncopy_do(opt, optsize, arg, strlen(arg)); + string_ncopy_do(opt, optsize, arg, arglen); return OK; } } |