diff --git a/tools/quake3/q3data/md3lib.c b/tools/quake3/q3data/md3lib.c index 76cc38d5..1e25ae62 100644 --- a/tools/quake3/q3data/md3lib.c +++ b/tools/quake3/q3data/md3lib.c @@ -154,8 +154,8 @@ void MD3_Dump( const char *filename ){ Error( "Unable to open '%s'\n", filename ); } - fileSize = filelength( fileno( fp ) ); - _buffer = malloc( filelength( fileno( fp ) ) ); + fileSize = Q_filelength( fp ); + _buffer = malloc( fileSize ); fread( _buffer, fileSize, 1, fp ); fclose( fp );