mirror of
https://github.com/RGBCube/serenity
synced 2025-10-29 15:02:07 +00:00
Using char causes bytes equal to or over 0x80 to be treated as a
negative value and produce incorrect results when implicitly casting to
u32.
For example, `atob` in LibWeb uses this decoder to convert non-ASCII
values to UTF-8, but non-ASCII values are >= 0x80 and thus produces
incorrect results in such cases:
```js
Uint8Array.from(atob("u660"), c => c.charCodeAt(0));
```
This used to produce [253, 253, 253] instead of [187, 174, 180].
Required by Cloudflare's IUAM challenges.
|
||
|---|---|---|
| .. | ||
| CMakeLists.txt | ||
| Decoder.cpp | ||
| Decoder.h | ||