Repository navigation
Commit 8fdac0c
fix(patch_set): multi-byte char boundary panic
The old byte-level reverse cmp could produce a suffix offset
inside a multi-byte UTF-8 character and panic.
Rewrite to track `/` positions during the reverse scan
and only split at those.
(`/` is ASCII so no boundary check needed)1 parent bd8ee5e commit 8fdac0c
2 files changed
Lines changed: 29 additions & 15 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
698 | 698 | | |
699 | 699 | | |
700 | 700 | | |
701 | | - | |
| 701 | + | |
| 702 | + | |
| 703 | + | |
| 704 | + | |
702 | 705 | | |
703 | 706 | | |
704 | 707 | | |
705 | 708 | | |
706 | | - | |
707 | | - | |
| 709 | + | |
| 710 | + | |
| 711 | + | |
| 712 | + | |
| 713 | + | |
| 714 | + | |
| 715 | + | |
| 716 | + | |
| 717 | + | |
| 718 | + | |
| 719 | + | |
| 720 | + | |
| 721 | + | |
708 | 722 | | |
709 | | - | |
| 723 | + | |
710 | 724 | | |
711 | 725 | | |
712 | 726 | | |
713 | 727 | | |
714 | | - | |
| 728 | + | |
715 | 729 | | |
716 | 730 | | |
717 | 731 | | |
718 | | - | |
719 | | - | |
720 | | - | |
721 | | - | |
722 | | - | |
723 | | - | |
724 | | - | |
| 732 | + | |
| 733 | + | |
| 734 | + | |
| 735 | + | |
| 736 | + | |
725 | 737 | | |
726 | 738 | | |
727 | 739 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
482 | 482 | | |
483 | 483 | | |
484 | 484 | | |
485 | | - | |
486 | 485 | | |
487 | 486 | | |
488 | 487 | | |
489 | 488 | | |
490 | 489 | | |
491 | | - | |
492 | | - | |
| 490 | + | |
| 491 | + | |
| 492 | + | |
| 493 | + | |
| 494 | + | |
493 | 495 | | |
494 | 496 | | |
495 | 497 | | |
| |||
0 commit comments