Commit f9d566f
committed
fix:
Previously it would try to byte-index a presumed ascii string to convert
hex to RGB, which could panic if the string wasn't actually ascii.
Now it validates that the characters to convert are actually on a character
boundary.Color/Name::from_str()` won't panic when encountering unicode values.1 parent 3f4db4a commit f9d566f
2 files changed
Lines changed: 2 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
204 | 204 | | |
205 | 205 | | |
206 | 206 | | |
207 | | - | |
| 207 | + | |
208 | 208 | | |
209 | 209 | | |
210 | 210 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
54 | 54 | | |
55 | 55 | | |
56 | 56 | | |
| 57 | + | |
57 | 58 | | |
58 | 59 | | |
59 | 60 | | |
| |||
0 commit comments