1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2024-11-23 21:07:17 +00:00

correct gdpushing of UTF8 224-240

This commit is contained in:
Zeno Rogue 2019-07-12 23:07:23 +02:00
parent b1fd71cf78
commit e5e0dfbac1

View File

@ -732,6 +732,14 @@ void gdpush_utf8(const string& s) {
u += (s[i] - 128) & 63;
gdpush(u); q++;
}
else if(uch >= 224 && uch < 240) {
int u = ((s[i] - 224)&15) << 12;
i++;
u += (s[i] & 63) << 6;
i++;
u += (s[i] & 63) << 0;
gdpush(u); q++;
}
else
#endif
{