Create

Create

86M Downloads

Client crash when check elevator name size

artem-afonin opened this issue · 2 comments

commented

Describe the Bug

Client (but not server) crashes when I try to set floor number and give a name to elevator block with russian symbols.

It occurs because russian symbols are encoded with two bytes per symbol. Elevator name textbox limits name size by 30 symbols (which is correct for Latin coding). But there is no double-check for actual buffer size.

Reproduction Steps

  1. Name elevator with more than 30 russian symbols (e.g. "Вертолётная площадка") (20 symbols, 39 bytes)

Expected Result

We can name with other coding rather than Latin-1 or limit textbox size for UTF-8 cases.

Screenshots and Videos

No response

Crash Report or Log

https://pastebin.com/MNzmMAuY

Operating System

Windows 10

Mod Version

0.5.1f

Minecraft Version

1.18.2

Forge Version

40.2.4

Other Mods

Deceased Craft modpack 5.3.3

Additional Context

No response

commented

Can confirm

commented

Yep, Chinese causes this as well. I'll look for a fix, thanks for the report!
Edit: wow, Chinese is even more data than russian, hmmmmm