summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSebastian Harl <sh@tokkee.org>2009-02-13 14:10:26 +0100
committerJonas Fonseca <fonseca@diku.dk>2009-02-13 14:32:56 +0100
commitb43e701fc529bbc22f7669a3029c9aa8c5cf2dcb (patch)
treee96ca55ae2052ec0952e04c7cf82d7fbb7df5f99
parent7b507b4156865c87a78f9ae8b22267264b9f9083 (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--NEWS1
-rw-r--r--tig.c2
2 files changed, 2 insertions, 1 deletions
diff --git a/NEWS b/NEWS
index 7927c21b..e52130cb 100644
--- a/NEWS
+++ b/NEWS
@@ -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
--------
diff --git a/tig.c b/tig.c
index 70720940..2b2607bd 100644
--- a/tig.c
+++ b/tig.c
@@ -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;
}
}