From: Pekka Riikonen Date: Wed, 19 Jul 2000 07:04:04 +0000 (+0000) Subject: Minor bug fix in silc_encode_pem X-Git-Tag: SILC.0.1~434 X-Git-Url: http://git.silcnet.org/gitweb/?a=commitdiff_plain;h=13bbc7b32bdc6227e9222141d651d91e4ce783b9;p=silc.git Minor bug fix in silc_encode_pem --- diff --git a/lib/silccore/silcutil.c b/lib/silccore/silcutil.c index 11d6fc9c..3a0b77ec 100644 --- a/lib/silccore/silcutil.c +++ b/lib/silccore/silcutil.c @@ -24,6 +24,9 @@ /* * $Id$ * $Log$ + * Revision 1.4 2000/07/19 07:04:04 priikone + * Minor bug fix in silc_encode_pem + * * Revision 1.3 2000/07/10 05:34:40 priikone * Added PEM encoding/decoding functions. * @@ -417,16 +420,16 @@ unsigned char *silc_decode_pem(unsigned char *pem, unsigned int pem_len, return NULL; break; case 2: - data[j] = bits >> 10; + data[j++] = bits >> 10; break; case 3: data[j++] = bits >> 16; - data[j] = (bits >> 8) & 0xff; + data[j++] = (bits >> 8) & 0xff; break; } if (ret_len) - *ret_len = j + 1; + *ret_len = j; return data; }