diff --git a/harbour/ChangeLog b/harbour/ChangeLog index 61b9f024f4..873641d6b8 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -8,6 +8,11 @@ 2008-12-31 13:59 UTC+0100 Foo Bar */ +2008-07-31 22:49 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl) + * harbour/contrib/hbmzip/hbmzip.c + ! added "b" to fopen() flags to force binary mode in all systems + during CRC32 calculation + 2008-07-31 18:58 UTC+0200 Viktor Szakats (harbour.01 syenar hu) * include/hbextern.ch + EXTERNAL __OBJGETPROPERTIES diff --git a/harbour/contrib/hbmzip/hbmzip.c b/harbour/contrib/hbmzip/hbmzip.c index 290e16522c..cc4c1a9d1b 100644 --- a/harbour/contrib/hbmzip/hbmzip.c +++ b/harbour/contrib/hbmzip/hbmzip.c @@ -517,7 +517,7 @@ static BOOL hb_zipGetFileInfo( const char* szFileName, ULONG * pulCRC, BOOL * pf BOOL fText = pfText != NULL, fResult = FALSE; ULONG ulCRC = 0; - file = hb_fopen( szFileName, "r" ); + file = hb_fopen( szFileName, "rb" ); if( file ) { unsigned char * pString = ( unsigned char * ) hb_xgrab( HB_Z_IOBUF_SIZE ); @@ -550,7 +550,7 @@ static BOOL hb_zipGetFileInfo( const char* szFileName, ULONG * pulCRC, BOOL * pf } while( ulRead == HB_Z_IOBUF_SIZE ); - fResult = feof( file ) != 0; + fResult = ferror( file ) == 0; hb_xfree( pString ); fclose( file );