Page 1 of 1

[Genhis][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.

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

Posted: Wed Apr 29, 2026 12:55 pm
by Genhis
Thanks for the report. The tag was accidentally exposed during a refactoring, so I removed it for the next release.