Skip to content

Commit

Permalink
Fix out-of-bound indexing.
Browse files Browse the repository at this point in the history
  • Loading branch information
LEE KYOUNGHEON committed Dec 30, 2024
1 parent 72d0e02 commit 9f40cfb
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions impl/control/ImGuiTaskCollector.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -903,9 +903,9 @@ void vk_gltf_viewer::control::ImGuiTaskCollector::nodeInspector(
[&](fastgltf::math::fmat4x4 &matrix) {
// | operator cannot be chained, because of the short circuit evaluation.
bool transformChanged = ImGui::DragFloat4("Column 0", matrix.col(0).data());
transformChanged |= ImGui::DragFloat4("Column 1", matrix.col(4).data());
transformChanged |= ImGui::DragFloat4("Column 2", matrix.col(8).data());
transformChanged |= ImGui::DragFloat4("Column 3", matrix.col(12).data());
transformChanged |= ImGui::DragFloat4("Column 1", matrix.col(1).data());
transformChanged |= ImGui::DragFloat4("Column 2", matrix.col(2).data());
transformChanged |= ImGui::DragFloat4("Column 3", matrix.col(3).data());

if (transformChanged) {
tasks.emplace_back(std::in_place_type<task::ChangeNodeLocalTransform>, selectedNodeIndex);
Expand Down

0 comments on commit 9f40cfb

Please sign in to comment.