add assert in case ftell fails

This commit is contained in:
KroArtem 2014-02-09 02:04:22 +04:00
parent 49d14e5046
commit cdeab373c3

View File

@ -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);