| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent ea50540 commit cb49f31
1 file changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -176,9 +176,11 @@ static int32_t fs__decode_wtf8_char(const char** input) { | |||
| 176 | 176 | if ((b4 & 0xC0) != 0x80) | |
| 177 | 177 | return -1; /* invalid: not a continuation byte */ | |
| 178 | 178 | code_point = (code_point << 6) | (b4 & 0x3F); | |
| 179 | - if (b1 <= 0xF4) | ||
| 179 | + if (b1 <= 0xF4) { | ||
| 180 | + code_point &= 0x1FFFFF; | ||
| 180 | 181 | if (code_point <= 0x10FFFF) | |
| 181 | 182 | return code_point; /* four-byte character */ | |
| 183 | + } | ||
| 182 | 184 | ||
| 183 | 185 | /* code point too large */ | |
| 184 | 186 | return -1; | |
| Back | FazBrowse Home | New Git URL |
0 commit comments