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
1 changed files with 8 additions and 0 deletions

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
{