You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mynewt.apache.org by ma...@apache.org on 2016/10/07 05:31:44 UTC

incubator-mynewt-core git commit: base64; fix BASE64_ENCODE_SIZE().

Repository: incubator-mynewt-core
Updated Branches:
  refs/heads/develop 81c89627b -> a398137f4


base64; fix BASE64_ENCODE_SIZE().


Project: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/commit/a398137f
Tree: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/tree/a398137f
Diff: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/diff/a398137f

Branch: refs/heads/develop
Commit: a398137f4fc4c1ff7e2f302846db9376e0d0a6a5
Parents: 81c8962
Author: Marko Kiiskila <ma...@runtime.io>
Authored: Thu Oct 6 22:29:10 2016 -0700
Committer: Marko Kiiskila <ma...@runtime.io>
Committed: Thu Oct 6 22:29:10 2016 -0700

----------------------------------------------------------------------
 encoding/base64/include/base64/base64.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/a398137f/encoding/base64/include/base64/base64.h
----------------------------------------------------------------------
diff --git a/encoding/base64/include/base64/base64.h b/encoding/base64/include/base64/base64.h
index 538e069..8e01fbb 100644
--- a/encoding/base64/include/base64/base64.h
+++ b/encoding/base64/include/base64/base64.h
@@ -31,7 +31,7 @@ int base64_decode(const char *, void *buf);
 int base64_pad(char *, int);
 int base64_decode_len(const char *str);
 
-#define BASE64_ENCODE_SIZE(__size) ((((__size) * 4) / 3) + 4)
+#define BASE64_ENCODE_SIZE(__size) (((((__size) - 1) / 3) * 4) + 4)
 
 #ifdef __cplusplus
 }