From 1183d9e337afea670985c21b0b019d7e3e886db1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Branimir=20Karad=C5=BEi=C4=87?= Date: Sat, 6 Feb 2016 13:41:58 -0800 Subject: [PATCH] Fixed mesh loading. --- examples/common/bgfx_utils.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/examples/common/bgfx_utils.cpp b/examples/common/bgfx_utils.cpp index cfa2df35..9b03d3d7 100644 --- a/examples/common/bgfx_utils.cpp +++ b/examples/common/bgfx_utils.cpp @@ -409,7 +409,9 @@ struct Mesh bx::AllocatorI* allocator = entry::getAllocator(); uint32_t chunk; - while (4 == bx::read(_reader, chunk) ) + bx::Error err; + while (4 == bx::read(_reader, chunk, &err) + && err.isOk() ) { switch (chunk) {