summaryrefslogtreecommitdiff
path: root/tools/editor/editor_initialize_ssl.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tools/editor/editor_initialize_ssl.cpp')
-rw-r--r--tools/editor/editor_initialize_ssl.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/tools/editor/editor_initialize_ssl.cpp b/tools/editor/editor_initialize_ssl.cpp
index c0b55b302f..b7f8e2aad5 100644
--- a/tools/editor/editor_initialize_ssl.cpp
+++ b/tools/editor/editor_initialize_ssl.cpp
@@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@@ -35,10 +35,11 @@ void editor_initialize_certificates() {
ByteArray data;
- data.resize(_certs_uncompressed_size);
+ data.resize(_certs_uncompressed_size+1);
{
ByteArray::Write w = data.write();
Compression::decompress(w.ptr(),_certs_uncompressed_size,_certs_compressed,_certs_compressed_size,Compression::MODE_DEFLATE);
+ w[_certs_uncompressed_size]=0; //make sure it ends at zero
}
StreamPeerSSL::load_certs_from_memory(data);