Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/COM classes/Shape.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2339,7 +2339,7 @@ STDMETHODIMP CShape::ImportFromBinary(const VARIANT bytesArray, VARIANT_BOOL* re

auto data = (char*)p; // TODO: Fix compile warning

const int recordLength = gsl::narrow_cast<int>(bytesArray.parray->cbElements);
const int recordLength = gsl::narrow_cast<int>(bytesArray.parray->rgsabound->cElements);
const bool result = _shp->put_RawData(data, recordLength);
*retVal = result ? VARIANT_TRUE : VARIANT_FALSE;

Expand Down
4 changes: 2 additions & 2 deletions src/Shapefile/ShapeWrapperCOM.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -844,8 +844,8 @@ int* CShapeWrapperCOM::get_RawData()
}
else if (_shapeType == SHP_POINTZ)
{
gsl::at(_points, 0)->get_M(&ddata[2]);
gsl::at(_points, 0)->get_Z(&ddata[3]);
gsl::at(_points, 0)->get_Z(&ddata[2]);
gsl::at(_points, 0)->get_M(&ddata[3]);
}
}
return intdata;
Expand Down
8 changes: 4 additions & 4 deletions src/Shapefile/ShapeWrapperPoint.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -223,8 +223,8 @@ bool CShapeWrapperPoint::put_RawData(char* shapeData, int recordLength)
}
else if (shpType == SHP_POINTZ)
{
_m = ddata[2];
_z = ddata[3];
_z = ddata[2];
_m = ddata[3];
}

_initialized = true;
Expand Down Expand Up @@ -252,8 +252,8 @@ int* CShapeWrapperPoint::get_RawData()
}
else if (_shpType == SHP_POINTZ)
{
ddata[2] = _m;
ddata[3] = _z;
ddata[2] = _z;
ddata[3] = _m;
}

return intdata;
Expand Down