mirror of
https://github.com/ocornut/imgui.git
synced 2026-01-18 17:11:23 +01:00
Fonts: fixed assertion failure when ImFontAtlasRectEntry::Generation overflows. (#8906)
This commit is contained in:
committed by
ocornut
parent
87c1ab7988
commit
a309d2dcac
@@ -4293,6 +4293,8 @@ void ImFontAtlasPackDiscardRect(ImFontAtlas* atlas, ImFontAtlasRectId id)
|
||||
index_entry->IsUsed = false;
|
||||
index_entry->TargetIndex = builder->RectsIndexFreeListStart;
|
||||
index_entry->Generation++;
|
||||
if (index_entry->Generation == 0)
|
||||
index_entry->Generation++; // Keep non-zero on overflow
|
||||
|
||||
const int pack_padding = atlas->TexGlyphPadding;
|
||||
builder->RectsIndexFreeListStart = index_idx;
|
||||
|
||||
Reference in New Issue
Block a user