All-leading tabs can crash layout
还没有人认领这个 Issue。
评估
调研方向
从 TabBarScrollToTab() 的实现以及 order = sections[1].TabCount + 1 之后紧跟 tab_bar.Tabs.Data[order] 索引访问的位置开始。在该访问之前,添加针对 tab_bar.Tabs.Size 的边界检查,然后测试一个每个标签页都使用 ImGuiTabItemFlags.Leading 的标签栏,以确认布局不再崩溃。完成意味着在不改变正常标签页滚动的情况下阻止越界访问。
由索引模型根据 Issue 内容生成。
描述
Upstream currently has this potential problem in TabBarScrollToTab():
When every tab has ImGuiTabItemFlags.Leading, TabBarScrollToTab() selects index TabCount + 1, beyond the active tabs, then accesses tab.Flags.
Possible fix:
order = sections[1].TabCount + 1
if order > tab_bar.Tabs.Size then return end -- NOTE: this check is added
tab = tab_bar.Tabs.Data[order]
I open this issue in case I forget about it.
NOTE: discovered by AI!
- 主要语言
- Lua
- 星标
- 18
- 派生
- 3
- 平均合并
- 23 小时 23 分钟
- 30 天内合并 PR
- 1
环境准备
这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
相似的 Issue
-
bug discord guide:04-redridge-mountains locale:enUS triage v4.1.1
难度 2/5 1-3 小时 新手友好度 65/100
维护者通常 1 天内回复
-
Data Correction Forever
难度 2/5 1-3 小时 新手友好度 62/100
维护者通常 1 天内回复
-
forever from-game
难度 2/5 1-3 小时 新手友好度 65/100
openmap-world/openmap#399 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 72/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 65/100
维护者通常 1 天内回复