Fix assertion failure when ImFontAtlasRectEntry::Generation overflows#8906
Fix assertion failure when ImFontAtlasRectEntry::Generation overflows#8906cfillion wants to merge 1 commit into
ImFontAtlasRectEntry::Generation overflows#8906Conversation
dc1d473 to
1159abe
Compare
1159abe to
88881ff
Compare
|
Thank you!
FYI the |
|
FYI you can change to the % 512 to e.g. % 128 to triggers this faster. |

Letting the following snippet run for a while (~40s @ 240FPS) triggers an assertion failure due to
ImFontAtlasRectEntry::Generationoverflowing:The assertion in
ImFontAtlasRectId_Makewas also off by one (takes ~1.5m @ 240FPS to trigger):EDIT: Tightened the assert in
ImFontAtlasRectId_Maketo catch would-be negativeTargetIndexvalues (<0 and 0x80000-0xFFFFF).