make line_i a size_t in memory_editor to avoid overflow
This commit is contained in:
parent
af8606c44a
commit
e66ecfe8a7
1 changed files with 1 additions and 1 deletions
2
third_party/imgui_club/imgui_memory_editor.h
vendored
2
third_party/imgui_club/imgui_memory_editor.h
vendored
|
@ -276,7 +276,7 @@ struct MemoryEditor
|
||||||
const char* format_byte_space = OptUpperCaseHex ? "%02X " : "%02x ";
|
const char* format_byte_space = OptUpperCaseHex ? "%02X " : "%02x ";
|
||||||
|
|
||||||
while (clipper.Step())
|
while (clipper.Step())
|
||||||
for (int line_i = clipper.DisplayStart; line_i < clipper.DisplayEnd; line_i++) // display only visible lines
|
for (size_t line_i = clipper.DisplayStart; line_i < clipper.DisplayEnd; line_i++) // display only visible lines
|
||||||
{
|
{
|
||||||
size_t addr = (size_t)(line_i * Cols);
|
size_t addr = (size_t)(line_i * Cols);
|
||||||
ImGui::Text(format_address, s.AddrDigitsCount, base_display_addr + addr);
|
ImGui::Text(format_address, s.AddrDigitsCount, base_display_addr + addr);
|
||||||
|
|
Loading…
Reference in a new issue