From 723849c57c84ae8dcc6b840891e300b490fefb0e 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 32c87d6bf..49eb18d44 100644 --- a/src/osgPlugins/shp/ESRIShape.cpp +++ b/src/osgPlugins/shp/ESRIShape.cpp @@ -838,7 +838,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;