[Tizen] Fix compile error when debug enabled 95/317495/2
authorEunki Hong <eunkiki.hong@samsung.com>
Thu, 2 Jan 2025 16:29:46 +0000 (01:29 +0900)
committerEunki Hong <eunkiki.hong@samsung.com>
Thu, 2 Jan 2025 16:30:28 +0000 (01:30 +0900)
Change-Id: Ifa1308f71dbffcb1d4ba3441d7959d47e1b0ff22
Signed-off-by: Eunki Hong <eunkiki.hong@samsung.com>
dali/devel-api/adaptor-framework/image-loading.cpp

index 6782980161e644682d2483b1dff3e0a466b566ea..501a3eda38d8d3feefd6342cd7abb00580e73090 100644 (file)
@@ -196,9 +196,12 @@ Devel::PixelBuffer DownloadImageSynchronously(const std::string& url, ImageDimen
         else
         {
           DALI_LOG_WARNING("Unable to decode bitmap supplied as in-memory blob.\n");
+
+          auto prefixSize  = std::min(static_cast<decltype(blobSize)>(0x200), blobSize); // maximum 512 bytes.
+          auto errorString = ConvertDataReadable(reinterpret_cast<uint8_t*>(dataBuffer.Begin()), prefixSize, 0x40);
           DALI_LOG_WARNING("URL: %s\n", url.c_str());
-          DALI_LOG_WARNING("Downloaded data (prefix 512 bytes): %s\n", ConvertDataReadable(reinterpret_cast<uint8_t*>(dataBuffer.Begin()), std::min(0x200, blobSize), 0x40).c_str());
-        }
+          DALI_LOG_WARNING("Downloaded data (prefix %zu bytes of %zu bytes):\n", prefixSize, blobSize);
+          DALI_LOG_WARNING("%s\n", errorString.c_str());        }
       }
       else
       {