{"thread":{"id":"17626","subject":"[PATCH] fix uninitialized variable in string_expand_length","startedAt":"2009-02-07T10:37:23Z","lastAt":"2009-02-08T09:58:38Z","messageCount":2,"participants":["Jeff King","Jonas Fonseca"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"103608","messageId":"20090207103723.GA18823@coredump.intra.peff.net","threadId":"17626","inReplyTo":null,"subject":"[PATCH] fix uninitialized variable in string_expand_length","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2009-02-07T10:37:23Z","receivedAt":"2009-02-07T10:37:23Z","isPatch":true,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"This led to totally unpredictable results from the function. The style\nmatches the loop in string_expand.\n\nSigned-off-by: Jeff King <peff@peff.net>\n---\n tig.c |    2 +-\n 1 files changed, 1 insertions(+), 1 deletions(-)\n\ndiff --git a/tig.c b/tig.c\nindex 79afdb1..97794b0 100644\n--- a/tig.c\n+++ b/tig.c\n@@ -193,7 +193,7 @@ string_expand_length(const char *line, int tabsize)\n {\n \tsize_t size, pos;\n \n-\tfor (pos = 0; line[pos]; pos++) {\n+\tfor (size = pos = 0; line[pos]; pos++) {\n \t\tif (line[pos] == '\\t' && tabsize > 0)\n \t\t\tsize += tabsize - (size % tabsize);\n \t\telse\n-- \n1.6.1.2.552.g1682c.dirty\n"},{"id":"103712","messageId":"2c6b72b30902080158t569ac25er3eb725035d4550d2@mail.gmail.com","threadId":"17626","inReplyTo":"20090207103723.GA18823@coredump.intra.peff.net","subject":"Re: [PATCH] fix uninitialized variable in string_expand_length","fromName":"Jonas Fonseca","fromEmail":"fonseca@diku.dk","sentAt":"2009-02-08T09:58:38Z","receivedAt":"2009-02-08T09:58:38Z","isPatch":true,"sender":{"key":"fonseca@diku.dk","avatar":"https://gravatar.com/avatar/f82f3ad698717c51873b020c750a92438c820a24056dc39fe4d07baa10a92264?d=mp&s=160"},"body":"On Sat, Feb 7, 2009 at 11:37, Jeff King <peff@peff.net> wrote:\n> This led to totally unpredictable results from the function. The style\n> matches the loop in string_expand.\n\nOops, thanks.\n\n-- \nJonas Fonseca\n"}]}