From: Nabil Ghodbane Date: Wed, 10 May 2023 14:39:25 +0000 (+0200) Subject: [CEA][Windows] if study from Most Recently Used studies is not present, SALOME crashes X-Git-Tag: V9_11_0b1^0 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=refs%2Ftlpr%2F4%2Fhead;p=modules%2Fkernel.git [CEA][Windows] if study from Most Recently Used studies is not present, SALOME crashes --- diff --git a/src/HDFPersist/HDFascii.cc b/src/HDFPersist/HDFascii.cc index 53a316706..188f3c8f9 100644 --- a/src/HDFPersist/HDFascii.cc +++ b/src/HDFPersist/HDFascii.cc @@ -90,7 +90,8 @@ bool HDFascii::isASCII(const char* thePath) { int fd; #if defined(WIN32) && defined(UNICODE) const wchar_t * aPath = Kernel_Utils::utf8_decode(thePath); - if (!(fd = _wopen(aPath, O_RDONLY))) return false; + fd = _wopen(aPath, O_RDONLY); + if (fd == -1) return false; #else if(!(fd = open(thePath, O_RDONLY))) return false; #endif