Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,7 @@ namespace minipbrt {
const ImageFilm* imagefilm = dynamic_cast<const ImageFilm*>(film);
printf("xresolution = %d\n", imagefilm->xresolution);
printf("yresolution = %d\n", imagefilm->yresolution);
printf("cropwindow = [ %f, %f, %f, %f ]\n", imagefilm->cropwwindow[0], imagefilm->cropwwindow[1], imagefilm->cropwwindow[2], imagefilm->cropwwindow[3]);
printf("cropwindow = [ %f, %f, %f, %f ]\n", imagefilm->cropwindow[0], imagefilm->cropwindow[1], imagefilm->cropwindow[2], imagefilm->cropwindow[3]);
printf("scale = %f\n", imagefilm->scale);
printf("maxsampleluminance = %f\n", imagefilm->maxsampleluminance);
printf("diagonal = %f mm\n", imagefilm->diagonal);
Expand Down
19 changes: 12 additions & 7 deletions minipbrt.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5168,19 +5168,23 @@ namespace minipbrt {
m_error = nullptr;
}

FileData* fdata = &m_fileData[m_includeDepth];
int64_t errorOffset = fdata->bufOffset + static_cast<int64_t>(m_pos - m_buf);

char* errorMessage = new char[size_t(len + 1)];
va_start(args, fmt);
vsnprintf(errorMessage, size_t(len + 1), fmt, args);
va_end(args);

m_error = new Error(fdata->filename, errorOffset, errorMessage);
if (m_fileData)
{
FileData* fdata = &m_fileData[m_includeDepth];
int64_t errorOffset = fdata->bufOffset + static_cast<int64_t>(m_pos - m_buf);
m_error = new Error(fdata->filename, errorOffset, errorMessage);

int64_t errorLine, errorCol;
cursor_location(&errorLine, &errorCol);
m_error->set_line_and_column(errorLine, errorCol);
int64_t errorLine, errorCol;
cursor_location(&errorLine, &errorCol);
m_error->set_line_and_column(errorLine, errorCol);
}
else
m_error = new Error("", 0, errorMessage);
}


Expand Down Expand Up @@ -5901,6 +5905,7 @@ namespace minipbrt {
delete loopsubdiv;
return false;
}
loopsubdiv->num_points /= 3;
shape = loopsubdiv;
}
break;
Expand Down