From: Junghyun Yeon Date: Fri, 7 Aug 2020 07:44:36 +0000 (+0900) Subject: Fix archive info to not fail if empty icon exists X-Git-Tag: submit/tizen/20200810.091347~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=ad45988feb885424eb3c550b11048ce8520df228;p=platform%2Fcore%2Fappfw%2Fwgt-backend.git Fix archive info to not fail if empty icon exists Change-Id: I6f69c2f10267ddf4a1418b29da93d5024cb236cb Signed-off-by: Junghyun Yeon --- diff --git a/src/lib/wgt_archive_info.cc b/src/lib/wgt_archive_info.cc index df7efc2..7552812 100644 --- a/src/lib/wgt_archive_info.cc +++ b/src/lib/wgt_archive_info.cc @@ -134,7 +134,7 @@ bool WgtArchiveInfo::ReadIcon(const bf::path& icon, const bf::path& tmp_dir) { std::streamoff len = ifs.tellg(); ifs.seekg(0, ifs.beg); - if (len <= 0) + if (len < 0) return false; icon_buf_.resize(len / sizeof(unsigned char));