From 9cf12d7544d501e6794cfbb6eabf508603d59966 Mon Sep 17 00:00:00 2001 From: Zolnai Tamás Date: Fri, 18 Apr 2014 15:12:09 +0200 Subject: Patching libgltf: character buffer is used as cstring Change-Id: If0213fc5406ec9cbdc72be36ffc693fcbbf8ffcc --- external/libgltf/UnpackedTarball_libgltf.mk | 1 + external/libgltf/patches/charbuffer_used_as_cstring.patch | 12 ++++++++++++ 2 files changed, 13 insertions(+) create mode 100644 external/libgltf/patches/charbuffer_used_as_cstring.patch 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; -- cgit