From 9a6ecec6a4396eafee5b5a80909a0b2ff3b33f79 Mon Sep 17 00:00:00 2001 From: David Steele Date: Wed, 2 Aug 2017 16:34:27 +0100 Subject: [PATCH] [Tizen] Workaround for remote image download File buffer is slightly too small, so the last byte doesn't get written to. Extending the buffer size enables the correct data to be written. Change-Id: Ieefe7580657cd516712c8fc912dbfa512019c1f7 Signed-off-by: David Steele --- platform-abstractions/tizen/resource-loader/network/file-download.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/platform-abstractions/tizen/resource-loader/network/file-download.cpp b/platform-abstractions/tizen/resource-loader/network/file-download.cpp index ad50249..f4d654b 100755 --- a/platform-abstractions/tizen/resource-loader/network/file-download.cpp +++ b/platform-abstractions/tizen/resource-loader/network/file-download.cpp @@ -100,10 +100,10 @@ size_t ChunkLoader(char *ptr, size_t size, size_t nmemb, void *userdata) CURLcode DownloadFileDataWithSize( CURL* curlHandle, Dali::Vector& dataBuffer, size_t dataSize ) { CURLcode result( CURLE_OK ); - dataBuffer.Resize( dataSize ); + dataBuffer.Resize( dataSize+4); // create - Dali::Internal::Platform::FileCloser fileCloser( static_cast(&dataBuffer[0]), dataSize, "wb" ); + Dali::Internal::Platform::FileCloser fileCloser( static_cast(&dataBuffer[0]), dataSize+4, "wb" ); FILE* dataBufferFilePointer = fileCloser.GetFile(); if( NULL != dataBufferFilePointer ) { -- 2.7.4