From cf80993a50ec7675968f49ee10f557da6756d950 Mon Sep 17 00:00:00 2001 From: Vicent Marti Date: Wed, 20 Feb 2013 18:46:10 +0100 Subject: [PATCH] signature: Small cleanup --- src/signature.c | 5 ++--- 1 file 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;