From e66ecfe8a7b7dd3dd77265ba541dcff4121d51fd Mon Sep 17 00:00:00 2001 From: silverweed Date: Thu, 11 Jul 2024 16:32:12 +0200 Subject: [PATCH] make line_i a size_t in memory_editor to avoid overflow --- third_party/imgui_club/imgui_memory_editor.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/third_party/imgui_club/imgui_memory_editor.h b/third_party/imgui_club/imgui_memory_editor.h index 50022e4..becd6c2 100644 --- a/third_party/imgui_club/imgui_memory_editor.h +++ b/third_party/imgui_club/imgui_memory_editor.h @@ -276,7 +276,7 @@ struct MemoryEditor const char* format_byte_space = OptUpperCaseHex ? "%02X " : "%02x "; 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); ImGui::Text(format_address, s.AddrDigitsCount, base_display_addr + addr);