Skip to content

DbfReader.Restart() does not reset CurrentIndex to 0 #63

@sweco-sedahd

Description

@sweco-sedahd

DbfReader.Restart() is missing setting CurrentIndex back to 0.

This causes a an incorrect calling of ThrowCorruptedShapefileDataException().

Code to reproduce:
var shpReader = Shapefile.OpenRead("Test.shp");
var ret1 = shpReader.Read();
shpReader.Restart();
var ret2 = shpReader.Read();

the second Read() throws ShapefileException with a message starting with text: "Corrupted shapefile data."

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions