From 9ca3dc085511c5ca520eba565084636d20501c3d Mon Sep 17 00:00:00 2001 From: granzuglia Date: Fri, 30 Apr 2010 17:34:59 +0000 Subject: [PATCH] fixed cast bug for 64bit architectures. --- wrap/io_trimesh/export_vmi.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/wrap/io_trimesh/export_vmi.h b/wrap/io_trimesh/export_vmi.h index 1239b902..aa6641a7 100644 --- a/wrap/io_trimesh/export_vmi.h +++ b/wrap/io_trimesh/export_vmi.h @@ -271,15 +271,15 @@ namespace io { /* end header */ if(vertSize!=0){ - unsigned int offsetV = (unsigned int) &m.vert[0]; + size_t offsetV = (size_t) &m.vert[0]; /* write the address of the first vertex */ - fwrite(&offsetV,sizeof(unsigned int),1,F()); + fwrite(&offsetV,sizeof(size_t),1,F()); } if(faceSize!=0){ - int offsetF= ( int) &m.face[0]; + size_t offsetF= ( size_t) &m.face[0]; /* write the address of the first face */ - fwrite(&offsetF,sizeof( int),1,F()); + fwrite(&offsetF,sizeof( size_t),1,F()); } /* save the object mesh */ fwrite(&m.shot,sizeof(Shot),1,F());