mirror of
https://github.com/chatmail/core.git
synced 2026-05-07 08:56:30 +03:00
(jikstra, hpk) fix a logic bug introduced with the stock-string merge which set the better message only if it was empty
This commit is contained in:
@@ -1212,11 +1212,8 @@ unsafe fn dc_mimeparser_add_single_part_if_known(
|
|||||||
info!(
|
info!(
|
||||||
mimeparser.context,
|
mimeparser.context,
|
||||||
0,
|
0,
|
||||||
"Simpliifed text: \n---\n{}\n--\n",
|
"Simpliifed text: {}",
|
||||||
String::from_utf8_lossy(std::slice::from_raw_parts(
|
as_str(simplified_txt),
|
||||||
decoded_data as *const u8,
|
|
||||||
decoded_data_bytes as usize,
|
|
||||||
))
|
|
||||||
);
|
);
|
||||||
|
|
||||||
let mut part = dc_mimepart_new();
|
let mut part = dc_mimepart_new();
|
||||||
|
|||||||
@@ -1723,7 +1723,7 @@ unsafe fn check_verified_properties(
|
|||||||
|
|
||||||
unsafe fn set_better_msg<T: AsRef<str>>(mime_parser: &mut dc_mimeparser_t, better_msg: T) {
|
unsafe fn set_better_msg<T: AsRef<str>>(mime_parser: &mut dc_mimeparser_t, better_msg: T) {
|
||||||
let msg = better_msg.as_ref();
|
let msg = better_msg.as_ref();
|
||||||
if !(msg.len() > 0) && !mime_parser.parts.is_empty() {
|
if msg.len() > 0 && !mime_parser.parts.is_empty() {
|
||||||
let part = &mut mime_parser.parts[0];
|
let part = &mut mime_parser.parts[0];
|
||||||
if (*part).type_0 == 10 {
|
if (*part).type_0 == 10 {
|
||||||
free(part.msg as *mut libc::c_void);
|
free(part.msg as *mut libc::c_void);
|
||||||
|
|||||||
Reference in New Issue
Block a user