Skip to content

Commit

Permalink
Merge pull request #2144 from floriankramer/master
Browse files Browse the repository at this point in the history
changed toff to size_t in writeBinaryCompressed
  • Loading branch information
SergioRAgostinho authored Dec 11, 2017
2 parents 6b6f798 + d0f9f04 commit 6d646d1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions io/include/pcl/io/impl/pcd_io.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -351,11 +351,11 @@ pcl::PCDWriter::writeBinaryCompressed (const std::string &file_name,
// pters[3] = &only_valid_data[offset_of_plane_RGB];
//
std::vector<char*> pters (fields.size ());
int toff = 0;
size_t toff = 0;
for (size_t i = 0; i < pters.size (); ++i)
{
pters[i] = &only_valid_data[toff];
toff += fields_sizes[i] * static_cast<int> (cloud.points.size ());
toff += static_cast<size_t>(fields_sizes[i]) * cloud.points.size();
}

// Go over all the points, and copy the data in the appropriate places
Expand Down

0 comments on commit 6d646d1

Please sign in to comment.