Fix bug where last character of a filename extracted from TNEF could be truncated (#5799)

pull/5922/head
Aleksander Machniak 7 years ago
parent c1285a0fe7
commit b6298429f1

@ -387,8 +387,6 @@ class rcube_tnef_decoder
*/
protected function convertString($str, $use_codepage = false)
{
$str = rtrim($str, "\0");
if ($convert && $this->codepage
&& ($charset = rcube_charset::$windows_codepages[$this->codepage])
) {
@ -398,6 +396,8 @@ class rcube_tnef_decoder
$str = rcube_charset::convert($str, 'UTF-16LE');
}
$str = rtrim($str, "\0");
return $str;
}
}

Loading…
Cancel
Save