TabBar: Fixed using more than 32 KB-worth of tab names. (#4176)

This commit is contained in:
ocornut
2021-05-27 11:58:04 +02:00
parent 04fd5072fb
commit 79e18896fe
3 changed files with 6 additions and 5 deletions

View File

@ -7765,7 +7765,7 @@ bool ImGui::TabItemEx(ImGuiTabBar* tab_bar, const char* label, bool* p_open,
tab->Flags = flags;
// Append name with zero-terminator
tab->NameOffset = (ImS16)tab_bar->TabsNames.size();
tab->NameOffset = (ImS32)tab_bar->TabsNames.size();
tab_bar->TabsNames.append(label, label + strlen(label) + 1);
// Update selected tab