diff options
Diffstat (limited to 'sql/spatial.cc')
-rw-r--r-- | sql/spatial.cc | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/sql/spatial.cc b/sql/spatial.cc index f96196cb836..f1dd0e6cebd 100644 --- a/sql/spatial.cc +++ b/sql/spatial.cc @@ -142,11 +142,10 @@ Geometry *Geometry::construct(Geometry_buffer *buffer, { uint32 geom_type; Geometry *result; - char byte_order; if (data_len < SRID_SIZE + WKB_HEADER_SIZE) // < 4 + (1 + 4) return NULL; - byte_order= data[SRID_SIZE]; + /* + 1 to skip the byte order (stored in position SRID_SIZE). */ geom_type= uint4korr(data + SRID_SIZE + 1); if (!(result= create_by_typeid(buffer, (int) geom_type))) return NULL; |