From cdeab373c33c434b4db1e90fa2d1cb8a42cf4d85 Mon Sep 17 00:00:00 2001 From: KroArtem Date: Sun, 9 Feb 2014 02:04:22 +0400 Subject: [PATCH] add assert in case ftell fails --- src/physics/triangle_mesh.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/physics/triangle_mesh.cpp b/src/physics/triangle_mesh.cpp index 83f79dfa4..65f7d27fb 100644 --- a/src/physics/triangle_mesh.cpp +++ b/src/physics/triangle_mesh.cpp @@ -102,6 +102,7 @@ void TriangleMesh::createCollisionShape(bool create_collision_object, const char FILE *f = fopen(serialized_bhv, "rb"); fseek(f, 0, SEEK_END); long pos = ftell(f); + assert(pos == -1L); fseek(f, 0, SEEK_SET); void* bytes = btAlignedAlloc(pos, 16);