From 65ac0ce09ec780831050b076a14e93251aa27480 Mon Sep 17 00:00:00 2001 From: Don Ho Date: Fri, 1 Nov 2013 07:54:59 +0000 Subject: [PATCH] [BUG_FIXED] (Author: FLS) Fix EOL type not correctly determined for UTF-16 files bug. git-svn-id: svn://svn.tuxfamily.org/svnroot/notepadplus/repository/trunk@1143 f5eea248-9336-0410-98b8-ebc06183d4e3 --- PowerEditor/src/ScitillaComponent/Buffer.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/PowerEditor/src/ScitillaComponent/Buffer.cpp b/PowerEditor/src/ScitillaComponent/Buffer.cpp index 445c27107..642ec0223 100644 --- a/PowerEditor/src/ScitillaComponent/Buffer.cpp +++ b/PowerEditor/src/ScitillaComponent/Buffer.cpp @@ -830,6 +830,7 @@ bool FileManager::loadFileData(Document doc, const TCHAR * filename, Utf8_16_Rea do { lenFile = fread(data+incompleteMultibyteChar, 1, blockSize-incompleteMultibyteChar, fp) + incompleteMultibyteChar; + if (lenFile <= 0) break; // check if file contain any BOM if (isFirstTime)