From a57832ce4f94564eee2c40f09e54e413b965aa34 Mon Sep 17 00:00:00 2001 From: Minggang Li Date: Mon, 5 Apr 2021 20:19:02 +0800 Subject: [PATCH] Enlarg encoding detect size to 128KB #314 Signed-off-by: Minggang Li --- src/MadEdit/MadLines.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/MadEdit/MadLines.cpp b/src/MadEdit/MadLines.cpp index b130240d..2dab85db 100644 --- a/src/MadEdit/MadLines.cpp +++ b/src/MadEdit/MadLines.cpp @@ -3051,7 +3051,7 @@ bool MadLines::LoadFromFile( const wxString &filename, const wxString &encoding m_MadEdit->SetEditMode( emTextMode ); } - const int max_detecting_size = 4096; + const int max_detecting_size = 4096 * 32; int s; if( m_FileData->m_Size > max_detecting_size ) @@ -3674,7 +3674,7 @@ bool MadLines::SaveToFile( const wxString &filename, const wxString &tempdir ) } else { - const int max_detecting_size = 4096; + const int max_detecting_size = 4096 * 32; int s; wxByte *buf = nullptr;