Page 1 of 1

[2.0.76] Crash using [sprite] rich text (TextRenderer::getSubstringWidth)

Posted: Mon Apr 13, 2026 8:40 pm
by Osmo
- Create a new world
- Input the following commands, in order

Code: Select all

/c game.player.gui.screen.add{type = "label", name = "label", caption = "[sprite][/sprite]"}
/c game.player.gui.screen.label.caption = "[sprite=]d[/sprite]"
/c game.player.gui.screen.label.caption = "[sprite=][][/sprite]"
/c game.player.gui.screen.label.caption = "[sprite=][/sprite]"
/c game.player.gui.screen.label.caption = "[sprite=]dhawudhuiaw[/sprite]"
- Game crashes

Re: [2.0.76] Crash using [sprite] rich text (TextRenderer::getSubstringWidth)

Posted: Mon Apr 13, 2026 9:35 pm
by Osmo
Additionally i'd like to note that [sprite] rich text tag isn't documented on the wiki, and i've got word that its internal and isn't supposed to be taken from user input, and maybe shouldn't be highlighted as rich text. That's a diffrent problem, but might be relevant.