diff --git a/src/osgPlugins/shp/ESRIShapeParser.cpp b/src/osgPlugins/shp/ESRIShapeParser.cpp index 5ff41fdcf..299fbe5d2 100644 --- a/src/osgPlugins/shp/ESRIShapeParser.cpp +++ b/src/osgPlugins/shp/ESRIShapeParser.cpp @@ -20,9 +20,9 @@ ESRIShapeParser::ESRIShapeParser( const std::string fileName, bool useDouble ): if( !fileName.empty() ) { #ifdef WIN32 - if( (fd = open( fileName.c_str(), O_RDONLY | O_BINARY )) <= 0 ) + if( (fd = open( fileName.c_str(), O_RDONLY | O_BINARY )) < 0 ) #else - if( (fd = open( fileName.c_str(), O_RDONLY )) <= 0 ) + if( (fd = open( fileName.c_str(), O_RDONLY )) < 0 ) #endif { perror( fileName.c_str() );