From 9b8696d3dd92e2ed6f310ad0f0bf3c2182c9c6ae Mon Sep 17 00:00:00 2001 From: Juan Linietsky Date: Wed, 11 Jun 2014 10:41:03 -0300 Subject: Light Baker! -=-=-=-=-=-= -Support for lightmap baker, have fun figuring out how it works before tutorial is published. --- core/bind/core_bind.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'core/bind/core_bind.cpp') diff --git a/core/bind/core_bind.cpp b/core/bind/core_bind.cpp index 960cdbac2..8d6662157 100644 --- a/core/bind/core_bind.cpp +++ b/core/bind/core_bind.cpp @@ -1418,7 +1418,7 @@ String _Marshalls::variant_to_base64(const Variant& p_var) { err = encode_variant(p_var,&w[0],len); ERR_FAIL_COND_V( err != OK, "" ); - int b64len = len / 3 * 4 + 4; + int b64len = len / 3 * 4 + 4 + 1; DVector b64buff; b64buff.resize(b64len); DVector::Write w64 = b64buff.write(); @@ -1437,7 +1437,7 @@ Variant _Marshalls::base64_to_variant(const String& p_str) { CharString cstr = p_str.ascii(); DVector buf; - buf.resize(strlen / 4 * 3); + buf.resize(strlen / 4 * 3 + 1); DVector::Write w = buf.write(); int len = base64_decode((char*)(&w[0]), (char*)cstr.get_data(), strlen); -- cgit v1.2.3-70-g09d2