| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
|
GNU testsuite comparison: Skipping an intermittent issue tests/cut/bounded-memory (passes in this run but fails in the 'main' branch) Skipping an intermittent issue tests/date/date-locale-hour (passes in this run but fails in the 'main' branch) Skipping an intermittent issue tests/pr/bounded-memory (passes in this run but fails in the 'main' branch) Congrats! The gnu test tests/seq/seq-epipe is now passing! |
Sorry, something went wrong.
`find_valid_number_with_suffix` used `numeric_part.len()` (byte count) as a char count in `chars().skip()`, causing desync when the numeric part contains multibyte characters (e.g. Arabic `٫` separator). This led to slicing into a multibyte char boundary and panicking. Fixed by using `chars().count()` for char iteration and computing byte indices via `char_indices().nth()` for string slicing.
| Back | FazBrowse Home | New Git URL |
Fixes #13937
What
numfmt panics with byte index N is not a char boundary when the input contains a multibyte locale decimal separator (e.g. Arabic ٫ U+066B in ar_SA.UTF-8) before a multibyte character and a suffix.
Root cause
find_valid_number_with_suffix used numeric_part.len() (byte length) as a char count in chars().skip(). When the numeric part contains multibyte characters, the byte count exceeds the char count, causing the char iterator to overshoot and the byte-slice index to land mid-character.
Fix
Testing