We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5989454 commit e983ddbCopy full SHA for e983ddb
src/Data.cpp
@@ -32,15 +32,19 @@ ezc3d::DataNS::Data::Data(
32
ezc3d::DataNS::RotationNS::Info rotationsInfo(c3d);
33
34
for (size_t j = 0; j < c3d.header().nbFrames(); ++j){
35
- if (file.eof())
36
- break;
37
-
38
ezc3d::DataNS::Frame f;
39
// Read point 3d
40
f.add(ezc3d::DataNS::Points3dNS::Points(c3d, file, pointsInfo));
41
42
// Read analogs
43
f.add(ezc3d::DataNS::AnalogsNS::Analogs(c3d, file, analogsInfo));
+
+ // If we ran out of space, then leave. The reason we test here is because
+ // is set after failing, resulting in one extra frame added if this if
44
+ // is after the push_back
45
+ if (file.eof())
46
+ break;
47
48
_frames.push_back(f);
49
}
50
0 commit comments