git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andreas Gruenbacher <agruen@suse.de>
To: git@vger.kernel.org
Cc: Andreas Gruenbacher <agruen@suse.de>
Subject: [PATCH 1/3] base85 debug code: Fix length byte calculation
Date: Fri,  8 Jan 2010 14:39:58 +0100	[thread overview]
Message-ID: <1262958000-27181-1-git-send-email-agruen@suse.de> (raw)
In-Reply-To: <alpine.LFD.2.00.1001071253400.21025@xanadu.home>

Signed-off-by: Andreas Gruenbacher <agruen@suse.de>
---
 base85.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/base85.c b/base85.c
index b417a15..1d165d9 100644
--- a/base85.c
+++ b/base85.c
@@ -118,7 +118,7 @@ int main(int ac, char **av)
 		int len = strlen(av[2]);
 		encode_85(buf, av[2], len);
 		if (len <= 26) len = len + 'A' - 1;
-		else len = len + 'a' - 26 + 1;
+		else len = len + 'a' - 26 - 1;
 		printf("encoded: %c%s\n", len, buf);
 		return 0;
 	}
-- 
1.6.6.75.g37bae

  parent reply	other threads:[~2010-01-08 13:50 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-01-07 14:58 base85: Two tiny fixes Andreas Gruenbacher
2010-01-07 17:58 ` Nicolas Pitre
2010-01-08 13:02   ` Andreas Gruenbacher
2010-01-08 13:39   ` Andreas Gruenbacher [this message]
2010-01-08 13:39   ` [PATCH 2/3] base85: No need to initialize the decode table in encode_85 Andreas Gruenbacher
2010-01-08 15:46     ` Michael J Gruber
2010-01-08 15:55       ` Junio C Hamano
2010-01-08 16:17         ` [PATCH] base85: encode85() does not use the decode table Andreas Gruenbacher
2010-01-08 16:22         ` [PATCH] base85: encode_85() " Andreas Gruenbacher
2010-01-08 13:40   ` [PATCH 3/3] base85: Make the code more obvious instead of explaining the non-obvious Andreas Gruenbacher
2010-01-08 23:15     ` A Large Angry SCM

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1262958000-27181-1-git-send-email-agruen@suse.de \
    --to=agruen@suse.de \
    --cc=git@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).