Commit de53013
committed
libast: utf8_mbtowc(): Fix utf8tab to match new type (re: ccc707c)
Given this:
if ((m = utf8tab[*sp]) > 0)
it was not correct to change the type of m to size_t because that's
an unsigned type, while utf8tab[] contains two final entries of -1.
However, since utf8_mbtowc otherwise treats -1 exactly the same way
as 0, and nothing else uses that table, it's enough just to change
those values to 0.1 parent ccc707c commit de53013
1 file changed
+2
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
484 | 484 | | |
485 | 485 | | |
486 | 486 | | |
487 | | - | |
| 487 | + | |
488 | 488 | | |
489 | 489 | | |
490 | 490 | | |
| |||
501 | 501 | | |
502 | 502 | | |
503 | 503 | | |
504 | | - | |
| 504 | + | |
505 | 505 | | |
506 | 506 | | |
507 | 507 | | |
| |||
0 commit comments