mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-27 03:36:39 +00:00
iconv_convert(): return empty vector in case of empty input
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@14866 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
6d23395dc7
commit
14c30e2b84
@ -31,6 +31,9 @@ std::vector<char>
|
||||
iconv_convert(std::string const & tocode, std::string const & fromcode,
|
||||
std::vector<char> const & buf)
|
||||
{
|
||||
if (buf.empty())
|
||||
return std::vector<char>();
|
||||
|
||||
iconv_t cd = iconv_open(tocode.c_str(), fromcode.c_str());
|
||||
if (cd == (iconv_t)(-1)) {
|
||||
lyxerr << "Error returned from iconv_open" << endl;
|
||||
|
Loading…
Reference in New Issue
Block a user