IMGUI: Fix memory allocator mismatch

This commit is contained in:
Scott Percival 2024-07-06 15:09:36 +08:00 committed by Eugene Sandulenko
parent 4d438a808d
commit 2f6dac578d

View File

@ -90,7 +90,7 @@ ImFont *addTTFFontFromArchive(const char *filename, float size_pixels, const ImF
uint size = f.size();
uint8 *ttfFile = new uint8[size];
uint8 *ttfFile = (uint8 *)ImGui::MemAlloc(size);
f.read(ttfFile, size);
ImGuiIO &io = ImGui::GetIO();
return io.Fonts->AddFontFromMemoryTTF(ttfFile, size, size_pixels, font_cfg_template, glyph_ranges);