Fix typo pos.second -> pos.size (via @mathisloge) ref #4187

This commit is contained in:
Artem Pavlenko 2020-11-18 15:58:00 +00:00
parent c6fc956a77
commit 3ae38bbab1
2 changed files with 2 additions and 2 deletions

View file

@ -122,7 +122,7 @@ mapnik::feature_ptr csv_index_featureset::next()
#else
std::fseek(file_.get(), pos.off, SEEK_SET);
std::vector<char> record;
record.resize(pos.second);
record.resize(pos.size);
if (std::fread(record.data(), pos.size, 1, file_.get()) != 1)
{
return mapnik::feature_ptr();

View file

@ -93,7 +93,7 @@ mapnik::feature_ptr geojson_index_featureset::next()
#else
std::fseek(file_.get(), pos.off, SEEK_SET);
std::vector<char> record;
record.resize(pos.second);
record.resize(pos.size);
auto count = std::fread(record.data(), pos.size, 1, file_.get());
auto const* start = record.data();
auto const* end = (count == 1) ? start + record.size() : start;