Skip to content

Commit 0d68262

Browse files
committed
Fix buffer overrun when parsing 'l' line.
1 parent 0e95051 commit 0d68262

File tree

2 files changed

+253
-259
lines changed

2 files changed

+253
-259
lines changed

loader_example.cc

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,8 +137,10 @@ static void PrintInfo(const tinyobj::attrib_t& attrib,
137137
for (size_t i = 0; i < shapes.size(); i++) {
138138
printf("shape[%ld].name = %s\n", static_cast<long>(i),
139139
shapes[i].name.c_str());
140-
printf("Size of shape[%ld].indices: %lu\n", static_cast<long>(i),
140+
printf("Size of shape[%ld].mesh.indices: %lu\n", static_cast<long>(i),
141141
static_cast<unsigned long>(shapes[i].mesh.indices.size()));
142+
printf("Size of shape[%ld].path.indices: %lu\n", static_cast<long>(i),
143+
static_cast<unsigned long>(shapes[i].path.indices.size()));
142144

143145
size_t index_offset = 0;
144146

0 commit comments

Comments
 (0)