[BUG_FiXED] Fix a regression of wrong behaviour while save an empty file.

git-svn-id: svn://svn.tuxfamily.org/svnroot/notepadplus/repository/trunk@957 f5eea248-9336-0410-98b8-ebc06183d4e3
This commit is contained in:
Don Ho 2012-09-11 18:47:35 +00:00
parent dcf7cc089b
commit bb0678a0da

View File

@ -640,6 +640,8 @@ bool FileManager::saveBuffer(BufferID id, const TCHAR * filename, bool isCopy, g
if (encoding == -1) //no special encoding; can be handled directly by Utf8_16_Write
{
items_written = UnicodeConvertor.fwrite(buf, lengthDoc);
if (lengthDoc == 0)
items_written = 1;
}
else
{