ImFontGlyphRangesBuilder: Fixed unnecessarily over-sized buffer, which incidentally was also not fully cleared. Fixed edge case overflow when adding character 0xFFFF. (#2568)
inlineboolGetBit(intn)const{intoff=(n>>5);ImU32mask=1u<<(n&31);return(UsedChars[off]&mask)!=0;}// Get bit n in the array
inlinevoidSetBit(intn){intoff=(n>>5);ImU32mask=1u<<(n&31);UsedChars[off]|=mask;}// Set bit n in the array
inlinevoidAddChar(ImWcharc){SetBit(c);}// Add character
IMGUI_APIvoidAddText(constchar*text,constchar*text_end=NULL);// Add string (each character of the UTF-8 string are added)
IMGUI_APIvoidAddRanges(constImWchar*ranges);// Add ranges, e.g. builder.AddRanges(ImFontAtlas::GetGlyphRangesDefault()) to force add all of ASCII/Latin+Ext
IMGUI_APIvoidBuildRanges(ImVector<ImWchar>*out_ranges);// Output new ranges