ShapeFileDrawing Bug in 5.2.4

This isn’t pretty… see line 1864 in ShapeFileDrawing.cpp for vector subscript out of range:

for (int n = 0; n < pointCount; n++)
{
double length = lengths[n - 1];
...

Hello @ultraLT

Thank you. At first glance, I don’t know the intent of the code. Perhaps we will call upon someone who was more involved in this code.

@Mathijs.Dumon, would you be able to review this code? Thank you.

EDIT: sorry I overlooked the first line :man_facepalming:

                for (int n = 0; n < pointCount; n++)
				{
                    double length = lengths[n - 1];
                    double correctedLength = length;

                    // Start of a new line:
                    if (data->Types[n] == PathPointTypeStart)
		{
                        totalLength = totalLengths[n] - (overflow ? 0 : markerSize);
                        ...

Indeed a bug - I’ll have a fix today.

bugfix released on de the develop branch

In MapWinGIS v5.3 this fix has been implemented.
@ultraLT Can you download and install that version and let us know if it solves your issue?

sorry i cannot…project is shelved :frowning: