summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--external/libgltf/UnpackedTarball_libgltf.mk1
-rw-r--r--external/libgltf/patches/charbuffer_used_as_cstring.patch12
2 files changed, 13 insertions, 0 deletions
diff --git a/external/libgltf/UnpackedTarball_libgltf.mk b/external/libgltf/UnpackedTarball_libgltf.mk
index 1fbe09d2c992..e83486d837b9 100644
--- a/external/libgltf/UnpackedTarball_libgltf.mk
+++ b/external/libgltf/UnpackedTarball_libgltf.mk
@@ -24,6 +24,7 @@ $(eval $(call gb_UnpackedTarball_add_patches,libgltf,\
external/libgltf/patches/include_typo_texture.patch \
external/libgltf/patches/adress_of_temporary.patch \
external/libgltf/patches/avoid_c++11.patch \
+ external/libgltf/patches/charbuffer_used_as_cstring.patch \
))
# vim: set noet sw=4 ts=4:
diff --git a/external/libgltf/patches/charbuffer_used_as_cstring.patch b/external/libgltf/patches/charbuffer_used_as_cstring.patch
new file mode 100644
index 000000000000..58f57017495a
--- /dev/null
+++ b/external/libgltf/patches/charbuffer_used_as_cstring.patch
@@ -0,0 +1,12 @@
+diff -ur libgltf.org/src/RenderScene.cpp libgltf/src/RenderScene.cpp
+--- libgltf.org/src/RenderScene.cpp 2014-04-18 13:52:31.148772285 +0200
++++ libgltf/src/RenderScene.cpp 2014-04-18 15:08:15.001604707 +0200
+@@ -211,7 +211,7 @@
+ {
+ if(0 == jsonfile)
+ return 0;
+- string tmpStr(jsonfile->buffer);
++ string tmpStr(jsonfile->buffer,jsonfile->size);
+ loadJson.setJsonInfo(tmpStr);
+ if (!loadJson.parseJsonFile())
+ return 0;