medfall

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs

commit ee78efce9cee4931b4ddbe1cd73d8707cb3d07e2
parent 7d4f90626b8d1c7e8548269341b1358e8190b0b5
Author: Michael Savage <mikejsavage@gmail.com>
Date:   Mon Oct 17 20:49:28 +0300

fopen wb to be safe

Diffstat:
pp.cc | 4+---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/pp.cc b/pp.cc @@ -162,10 +162,8 @@ static void write_compressed_file( const void * data, size_t len, const char * f len, LZ4_compressBound( len ), COMPRESSION_LEVEL ); // write - FILE * file = fopen( path.c_str(), "w" ); + FILE * file = fopen( path.c_str(), "wb" ); assert( file != NULL ); - // TODO: endianness/use Stream - // fwrite( &compressed_len, sizeof( compressed_len ), 1, file ); fwrite( compressed, 1, compressed_len, file ); fclose( file ); assert( ferror( file ) == 0 );