From: rnv Date: Thu, 24 Oct 2013 08:36:05 +0000 (+0000) Subject: Open SAUV file in binary mode on WINDOWS to fix the "0022370 [CEA 970] Bug reading... X-Git-Tag: V7_3_0a1~61 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=1360de06872df63fe509104a93a55e5bf8d4da2d;p=modules%2Fmed.git Open SAUV file in binary mode on WINDOWS to fix the "0022370 [CEA 970] Bug reading XDR sauv file under Windows 32 bits" issue. --- diff --git a/src/MEDLoader/SauvMedConvertor.cxx b/src/MEDLoader/SauvMedConvertor.cxx index 2d4075deb..8578ffb7a 100644 --- a/src/MEDLoader/SauvMedConvertor.cxx +++ b/src/MEDLoader/SauvMedConvertor.cxx @@ -2045,7 +2045,11 @@ bool XDRReader::open() { bool xdr_ok = false; #ifdef HAS_XDR +#ifdef WIN32 + if ((_xdrs_file = ::fopen(_fileName.c_str(), "rb"))) +#else if ((_xdrs_file = ::fopen(_fileName.c_str(), "r"))) +#endif { _xdrs = (XDR *)malloc(sizeof(XDR)); xdrstdio_create((XDR*)_xdrs, _xdrs_file, XDR_DECODE);