diff options
author | Vicent Marti <tanoku@gmail.com> | 2013-02-20 21:46:10 +0400 |
---|---|---|
committer | Vicent Marti <tanoku@gmail.com> | 2013-02-20 21:46:10 +0400 |
commit | cf80993a50ec7675968f49ee10f557da6756d950 (patch) | |
tree | 3a679a22ba226c6d0bb8ee6306529e21d7083261 /src | |
parent | 41051e3fe1bcb4099714551b61e0b7b06275557c (diff) |
signature: Small cleanupsignatures-2
Diffstat (limited to 'src')
-rw-r--r-- | src/signature.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/signature.c b/src/signature.c index a18f10474..164e8eb67 100644 --- a/src/signature.c +++ b/src/signature.c @@ -145,9 +145,8 @@ int git_signature__parse(git_signature *sig, const char **buffer_out, if (!email_start || !email_end || email_end <= email_start) return signature_error("malformed e-mail"); - sig->name = extract_trimmed(buffer, email_start - buffer); - email_start += 1; + sig->name = extract_trimmed(buffer, email_start - buffer - 1); sig->email = extract_trimmed(email_start, email_end - email_start); /* Do we even have a time at the end of the signature? */ @@ -158,7 +157,7 @@ int git_signature__parse(git_signature *sig, const char **buffer_out, if (git__strtol64(&sig->when.time, time_start, &time_end, 10) < 0) return signature_error("invalid Unix timestamp"); - /* no timezone at all */ + /* do we have a timezone? */ if (time_end + 1 < buffer_end) { int offset, hours, mins; const char *tz_start, *tz_end; |