Commit 86f4561
committed
Fix regression in implicit casting from integer -> string
Modelling AML strings in Rust is tricky; conversion from integers with
`String::from_utf8_lossy` keeps trailing null bytes - this is likely fine
in C because of how string comparisons would work, but trips up comparison
in Rust's `String` (and `CString` cannot have multiple trailing null bytes).
This fixes a regression in uACPI's implicit_case_semantics by removing
trailing null bytes when doing an integer -> string conversion.
It may be that the correct place to fix this holistically is rather in the
object comparsion, but this seems like a reasonable step given the current
failing case.1 parent 20da637 commit 86f4561
1 file changed
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
316 | 316 | | |
317 | 317 | | |
318 | 318 | | |
319 | | - | |
| 319 | + | |
320 | 320 | | |
321 | 321 | | |
322 | 322 | | |
| |||
0 commit comments