Commit e814197
committed
Fix bug in mb_get_substr_slow (sometimes outputs wrong number of characters)
Thanks to Maurício Fauth for finding and reporting this bug.
The bug was introduced in October 2022. It originally only affected
text encodings which do not have a fixed byte width per characters
and for which mbstring does not have an mblen_table. However, I recently
made another change to mbstring, such that mb_substr no longer relies
on the mblen_table even if one is available. Because of this change,
the bug earlier introduced in October 2022 now affected a greater
number of text encodings, including UTF-8.1 parent 87c906c commit e814197
2 files changed
+9
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2092 | 2092 | | |
2093 | 2093 | | |
2094 | 2094 | | |
2095 | | - | |
| 2095 | + | |
| 2096 | + | |
2096 | 2097 | | |
2097 | | - | |
| 2098 | + | |
2098 | 2099 | | |
2099 | 2100 | | |
2100 | 2101 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
133 | 133 | | |
134 | 134 | | |
135 | 135 | | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
136 | 141 | | |
137 | 142 | | |
138 | 143 | | |
| |||
213 | 218 | | |
214 | 219 | | |
215 | 220 | | |
| 221 | + | |
0 commit comments