You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Don't add null bytes in serialize::json::Encoder::write_char
This fixesrust-lang#19514 using a two-line patch suggested by @lifthrasiir. The
code snippet:
```rust
extern crate serialize;
fn main() {
let s = serialize::json::encode(&'c');
println!("Encoded: {}, bytes: {}", s, s.as_bytes());
}
```
...serialized 'c' as `[34, 99, 0, 0, 0, 34]` when it should have used
`[34, 99, 34]`. A test case is included.
0 commit comments