fix dc_tools handling of deletion and reading

This commit is contained in:
dignifiedquire
2019-05-02 19:31:49 +02:00
parent 4ed2d1204c
commit 2c69d6e767
2 changed files with 20 additions and 10 deletions

View File

@@ -459,7 +459,7 @@ pub unsafe extern "C" fn stress_functions(context: &dc_context_t) {
);
assert_eq!(buf_bytes, 7);
assert_eq!(
CStr::from_ptr(buf as *const libc::c_char).to_str().unwrap(),
std::str::from_utf8(std::slice::from_raw_parts(buf as *const u8, buf_bytes)).unwrap(),
"content"
);