From fe25b2961b688e5374a0eea05310932958dd97a3 Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Wed, 21 Dec 2016 11:40:16 +0000 Subject: [PATCH] From Andreas Ekstrand, "he attached ESRIShape.cpp contains a small fix in parsing of PointZ features, now correctly comparing with header content length which is defined in 16-bit words. This should have been fixed in my old submission from 2012 but was probably overlooked due to an alternative way of comparing to a fix number for this feature type. Without this fix, the plugin will only read one PointZ feature even if multiple features exist." --- src/osgPlugins/shp/ESRIShape.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/osgPlugins/shp/ESRIShape.cpp b/src/osgPlugins/shp/ESRIShape.cpp index 8ffd4dcd4..f5ece532f 100644 --- a/src/osgPlugins/shp/ESRIShape.cpp +++ b/src/osgPlugins/shp/ESRIShape.cpp @@ -810,7 +810,7 @@ bool PointZ::read( int fd ) return false; // Sometimes, M field is not supplied - if( rh.contentLength >= 18 ) + if( rh.contentLength*2 >= 18 ) if( readVal( fd, m, LittleEndian ) == false ) return false;