[jasper/world/studio/worldobjectseteditor] Fix possible array overrun
This commit is contained in:
@ -144,15 +144,17 @@ void WorldObjectSetEditorImGui::loadObj() noexcept {
|
|||||||
w = m_visibleSubsheet->columns;
|
w = m_visibleSubsheet->columns;
|
||||||
h = m_visibleSubsheet->rows;
|
h = m_visibleSubsheet->rows;
|
||||||
}
|
}
|
||||||
auto const idx = getTileIdx(
|
auto const tileIdx = getTileIdx(
|
||||||
*m_tileSheet,
|
*m_tileSheet,
|
||||||
subsheetId).or_value(0);
|
subsheetId).or_value(0);
|
||||||
|
auto const&palAddr = m_doc.palettes.size() > obj.palBank ?
|
||||||
|
m_doc.palettes[obj.palBank] : ox::FileAddress{};
|
||||||
oxLogError(m_colView.setup(
|
oxLogError(m_colView.setup(
|
||||||
m_doc.tilesheet,
|
m_doc.tilesheet,
|
||||||
m_doc.palettes[obj.palBank],
|
palAddr,
|
||||||
w,
|
w,
|
||||||
h,
|
h,
|
||||||
static_cast<uint_t>(idx),
|
static_cast<uint_t>(tileIdx),
|
||||||
obj.collisionMap));
|
obj.collisionMap));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user