diff --git a/commit.c b/commit.c index 718e568855..a92958cfac 100644 --- a/commit.c +++ b/commit.c @@ -760,7 +760,7 @@ static void fill_person(struct interp *table, const char *msg, int len) if (msg + start == ep) return; - table[5].value = xstrndup(msg + start, ep - msg + start); + table[5].value = xstrndup(msg + start, ep - (msg + start)); /* parse tz */ for (start = ep - msg + 1; start < len && isspace(msg[start]); start++)