Skip to content
This repository was archived by the owner on Jul 20, 2023. It is now read-only.

Commit e06f304

Browse files
committed
Extend char size to 4 (end character on Linux)
1 parent 93b7941 commit e06f304

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

src/SolARDeviceDataLoader.cpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -129,17 +129,15 @@ namespace SolAR {
129129
{
130130
// Prepare loader for images, poses
131131
for (int id_camera = 0; id_camera < m_nbCameras; ++id_camera) {
132-
char index[3];
132+
char index[4] = {};
133133
std::sprintf(index, "%03d", id_camera);
134-
135134
// pose loader
136135
std::string pathToPose = m_pathToData + "/pose_" + index + ".txt";
137136
m_poseFiles[id_camera].open(pathToPose);
138137
if (!m_poseFiles[id_camera].is_open()) {
139138
LOG_ERROR("Cannot load pose file of camera {}", id_camera);
140139
FrameworkReturnCode::_ERROR_;
141140
}
142-
143141
// camera loader
144142
std::string pathToImages = m_pathToData + "/" + index + "/%08d.jpg";
145143
m_cameras[id_camera].open(pathToImages);

0 commit comments

Comments
 (0)