Bannerlord.MBOptionScreen icon indicating copy to clipboard operation
Bannerlord.MBOptionScreen copied to clipboard

Long texts in string settings

Open sebaslavigne opened this issue 4 years ago • 2 comments

When using very long texts in the settings they overflow the text box. The text editing dialog also presents some glitches, and when trying to select the whole text the game throws:

System.ArgumentOutOfRangeException: 'Length cannot be less than zero.
Parameter name: length'

The example images are settings containing banner codes generated with the online banner editor

Images

image

image

sebaslavigne avatar May 01 '20 20:05 sebaslavigne

Can't say it's expected that the game would handle this, but adding length checks in MCM would be a good thing anyway. Thanks for reporting!

Aragas avatar May 06 '20 00:05 Aragas

This concrete error, if I remember right, is caused by some strange condition Basically, it will trigger when casually using the edit dialog and randomly selecting text. The game's logic is causing this. I added a simple workaround that ignores the exception. Further investigation is needed

Aragas avatar Jun 22 '20 16:06 Aragas