Fix unicode compiler warning again
This commit is contained in:
parent
19cc80788d
commit
53dd065daf
1 changed files with 2 additions and 2 deletions
4
tccpp.c
4
tccpp.c
|
|
@ -349,10 +349,10 @@ ST_INLN char *unicode_to_utf8 (char *b, uint32_t Uc)
|
|||
{
|
||||
if (Uc<0x80) *b++=Uc;
|
||||
else if (Uc<0x800) *b++=192+Uc/64, *b++=128+Uc%64;
|
||||
else if (Uc-0xd800u<0x800) return b;
|
||||
else if (Uc-0xd800u<0x800) goto error;
|
||||
else if (Uc<0x10000) *b++=224+Uc/4096, *b++=128+Uc/64%64, *b++=128+Uc%64;
|
||||
else if (Uc<0x110000) *b++=240+Uc/262144, *b++=128+Uc/4096%64, *b++=128+Uc/64%64, *b++=128+Uc%64;
|
||||
else tcc_error("0x%x is not a valid universal character", Uc);
|
||||
else error: tcc_error("0x%x is not a valid universal character", Uc);
|
||||
return b;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue