fix bug in zipios::writeUint16

This commit is contained in:
wmayer
2018-12-27 13:17:40 +01:00
parent 6297a58a1e
commit 7387ec68c8

View File

@@ -105,7 +105,7 @@ inline uint16 readUint16 ( istream &is ) {
}
inline void writeUint16 ( uint16 host_val, ostream &os ) {
uint16 val = (uint16)htozl( reinterpret_cast< unsigned char * >( &host_val ) ) ;
uint16 val = htozs( reinterpret_cast< unsigned char * >( &host_val ) ) ;
os.write( reinterpret_cast< char * >( &val ), sizeof( uint16 ) ) ;
}