1
0
mirror of synced 2025-02-17 18:59:21 +01:00

fix: Vector out of bounds access

This commit is contained in:
WerWolv 2022-06-13 21:56:02 +02:00
parent f243ac7464
commit a5d202ffc8
2 changed files with 18 additions and 16 deletions

@ -1 +1 @@
Subproject commit 31ae5773b099cb48cdd81bc8b6c01e6da94fe672
Subproject commit 55324f345e955bdc8ba23b32feeae31acbbc3ffc

View File

@ -655,6 +655,7 @@ namespace hex::plugin::builtin {
const auto cellBytes = std::min<u64>(validBytes, bytesPerCell);
// Query cell colors
if (x < validBytes) {
const auto foregroundColor = queryForegroundColor(byteAddress, &bytes[x], cellBytes);
const auto backgroundColor = [&]{
auto color = queryBackgroundColor(byteAddress, &bytes[x], cellBytes);
@ -675,6 +676,7 @@ namespace hex::plugin::builtin {
);
}
}
}
// Draw byte columns
ImGui::PushStyleVar(ImGuiStyleVar_CellPadding, ImVec2(3, 0));