Skip to content

Commit 9f40cfb

Browse files
author
LEE KYOUNGHEON
committed
Fix out-of-bound indexing.
1 parent 72d0e02 commit 9f40cfb

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

impl/control/ImGuiTaskCollector.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -903,9 +903,9 @@ void vk_gltf_viewer::control::ImGuiTaskCollector::nodeInspector(
903903
[&](fastgltf::math::fmat4x4 &matrix) {
904904
// | operator cannot be chained, because of the short circuit evaluation.
905905
bool transformChanged = ImGui::DragFloat4("Column 0", matrix.col(0).data());
906-
transformChanged |= ImGui::DragFloat4("Column 1", matrix.col(4).data());
907-
transformChanged |= ImGui::DragFloat4("Column 2", matrix.col(8).data());
908-
transformChanged |= ImGui::DragFloat4("Column 3", matrix.col(12).data());
906+
transformChanged |= ImGui::DragFloat4("Column 1", matrix.col(1).data());
907+
transformChanged |= ImGui::DragFloat4("Column 2", matrix.col(2).data());
908+
transformChanged |= ImGui::DragFloat4("Column 3", matrix.col(3).data());
909909

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

0 commit comments

Comments
 (0)