From c6a31cb1d38fe7731b24f7c5b41a84bcbd6841b6 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Gy=C3=B6rgy=20Straub?= Date: Mon, 27 Jan 2020 09:53:14 +0000 Subject: [PATCH] Fix: Dali::Internal::StyleMonitor::LoadThemeFile() opens files as binary. MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Attempting to read the style-sheet.jsons as text fails on Windows, due to the garbage which the CRLF conversion - performed by the OS - appears to create at the end of the file. N.B. the binary specifier to fopen() has no effect on POSIX systems. (source: https://en.cppreference.com/w/c/io/fopen ) Change-Id: Ibf96d9194ed7d1953b35248c5044136b5fb01497 Signed-off-by: György Straub --- dali/internal/styling/common/style-monitor-impl.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dali/internal/styling/common/style-monitor-impl.cpp b/dali/internal/styling/common/style-monitor-impl.cpp index 5b316b4..9b23434 100644 --- a/dali/internal/styling/common/style-monitor-impl.cpp +++ b/dali/internal/styling/common/style-monitor-impl.cpp @@ -159,7 +159,7 @@ bool StyleMonitor::LoadThemeFile( const std::string& filename, std::string& outp std::streampos bufferSize = 0; Dali::Vector fileBuffer; - if( Dali::FileLoader::ReadFile( filename, bufferSize, fileBuffer, FileLoader::FileType::TEXT ) ) + if( Dali::FileLoader::ReadFile( filename, bufferSize, fileBuffer, FileLoader::FileType::BINARY ) ) { output.assign( &fileBuffer[0], bufferSize ); retval = true; -- 2.7.4