Commit 8f1c0e9
authored
Fix UTF16ToString in TEXTDECODER=2 and MAXIMUM_MEMORY>=2GB (#24335)
I accidentally noticed that Embind UTF-16 support was producing
incorrect results with MAXIMUM_MEMORY over 2GB.
Turns out, the `TextDecoder` implementation of `UTF16ToString` itself
was broken in this mode due to bitwise ops, so I've added new tests and
fixed this bug, slightly simplifying code in the process.1 parent 5fd73d6 commit 8f1c0e9
File tree
6 files changed
+38
-22
lines changed- src/lib
- test
- code_size
- other
6 files changed
+38
-22
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
44 | 44 | | |
45 | 45 | | |
46 | 46 | | |
| 47 | + | |
47 | 48 | | |
48 | 49 | | |
49 | 50 | | |
| |||
322 | 323 | | |
323 | 324 | | |
324 | 325 | | |
| 326 | + | |
| 327 | + | |
325 | 328 | | |
326 | | - | |
327 | 329 | | |
328 | 330 | | |
329 | 331 | | |
330 | 332 | | |
331 | | - | |
332 | | - | |
| 333 | + | |
333 | 334 | | |
334 | 335 | | |
335 | | - | |
336 | | - | |
| 336 | + | |
337 | 337 | | |
338 | 338 | | |
339 | | - | |
| 339 | + | |
340 | 340 | | |
341 | | - | |
| 341 | + | |
342 | 342 | | |
343 | 343 | | |
344 | 344 | | |
| |||
348 | 348 | | |
349 | 349 | | |
350 | 350 | | |
351 | | - | |
352 | | - | |
| 351 | + | |
| 352 | + | |
353 | 353 | | |
354 | 354 | | |
355 | 355 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
| 5 | + | |
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
9 | | - | |
| 9 | + | |
10 | 10 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
339 | 339 | | |
340 | 340 | | |
341 | 341 | | |
| 342 | + | |
| 343 | + | |
| 344 | + | |
| 345 | + | |
| 346 | + | |
| 347 | + | |
| 348 | + | |
| 349 | + | |
| 350 | + | |
| 351 | + | |
| 352 | + | |
| 353 | + | |
| 354 | + | |
342 | 355 | | |
343 | 356 | | |
344 | 357 | | |
| |||
5655 | 5668 | | |
5656 | 5669 | | |
5657 | 5670 | | |
| 5671 | + | |
5658 | 5672 | | |
5659 | 5673 | | |
5660 | 5674 | | |
| 5675 | + | |
5661 | 5676 | | |
5662 | 5677 | | |
5663 | 5678 | | |
| 5679 | + | |
5664 | 5680 | | |
5665 | 5681 | | |
5666 | 5682 | | |
5667 | 5683 | | |
5668 | 5684 | | |
5669 | 5685 | | |
| 5686 | + | |
5670 | 5687 | | |
5671 | 5688 | | |
5672 | 5689 | | |
5673 | 5690 | | |
| 5691 | + | |
5674 | 5692 | | |
5675 | 5693 | | |
5676 | 5694 | | |
| 5695 | + | |
5677 | 5696 | | |
5678 | | - | |
| 5697 | + | |
5679 | 5698 | | |
5680 | 5699 | | |
5681 | 5700 | | |
5682 | 5701 | | |
| 5702 | + | |
5683 | 5703 | | |
5684 | | - | |
5685 | | - | |
5686 | | - | |
5687 | | - | |
5688 | | - | |
5689 | | - | |
| 5704 | + | |
| 5705 | + | |
5690 | 5706 | | |
5691 | | - | |
| 5707 | + | |
5692 | 5708 | | |
5693 | 5709 | | |
5694 | 5710 | | |
| |||
0 commit comments