- fixed the player name display.
This was broken by several small unicode-incompatible code fragments. This commit also removes the input limit for the player name and the savegame description. With multibyte encoding, limiting them to a fixed length did not work right. Currently these will just overflow the fields if the text becomes too long, this needs some additional work.
This commit is contained in:
parent
deb233677e
commit
d39a624942
6 changed files with 25 additions and 29 deletions
|
|
@ -94,7 +94,7 @@ int utf8_decode(const uint8_t *src, int *size)
|
|||
return c;
|
||||
}
|
||||
|
||||
int c1 = src[1];
|
||||
int c1 = src[1] & 0x3f;
|
||||
|
||||
if ((c & 0xE0) == 0xC0)
|
||||
{
|
||||
|
|
@ -107,7 +107,7 @@ int utf8_decode(const uint8_t *src, int *size)
|
|||
return -1;
|
||||
}
|
||||
|
||||
int c2 = src[2];
|
||||
int c2 = src[2] & 0x3f;
|
||||
|
||||
if ((c & 0xF0) == 0xE0)
|
||||
{
|
||||
|
|
@ -120,7 +120,7 @@ int utf8_decode(const uint8_t *src, int *size)
|
|||
return -1;
|
||||
}
|
||||
|
||||
int c3 = src[3];
|
||||
int c3 = src[3] & 0x3f;
|
||||
|
||||
if ((c & 0xF8) == 0xF0)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue