Commit f087bac
committed
pp_pack: utf8_to_bytes: Use 'uv' form, not 'uvchr'
Like previous commits, this converts a call to utf8n_to_uvchr() to
instead use utf8_to_uv_flags().
Unlike those commits, the previous code did in fact properly check for
failure. But upon failure, it semi-unsafely assumed the start byte was
accurate as to the intended byte length of the input character. (It did
check that the returned value did not go past the end of the buffer, by
using UTF8_SAFE_SKIP() ). The new function call always returns the
correct number of bytes, so just use that instead of trying to recompute
it.
The mechanism for deteriming failure no longer depends on the CHECK_ONLY
flag, so that is removed.1 parent 78defb0 commit f087bac
1 file changed
+6
-6
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
282 | 282 | | |
283 | 283 | | |
284 | 284 | | |
285 | | - | |
286 | | - | |
| 285 | + | |
287 | 286 | | |
288 | 287 | | |
289 | 288 | | |
290 | 289 | | |
291 | 290 | | |
292 | 291 | | |
293 | 292 | | |
294 | | - | |
295 | | - | |
296 | | - | |
| 293 | + | |
| 294 | + | |
297 | 295 | | |
298 | | - | |
| 296 | + | |
299 | 297 | | |
300 | 298 | | |
301 | 299 | | |
302 | 300 | | |
303 | 301 | | |
304 | 302 | | |
| 303 | + | |
| 304 | + | |
305 | 305 | | |
306 | 306 | | |
307 | 307 | | |
| |||
0 commit comments