From 178a466139e1a973f3c66beb3723006563f5aa07 Mon Sep 17 00:00:00 2001 From: Jean-Philip Desjardins Date: Fri, 3 Jan 2025 19:06:50 -0500 Subject: [PATCH] ChdImageStream: Fix image size computation. --- Source/discimages/ChdImageStream.cpp | 2 +- Source/discimages/ChdImageStream.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Source/discimages/ChdImageStream.cpp b/Source/discimages/ChdImageStream.cpp index ff3c54ffb8..531b81997d 100644 --- a/Source/discimages/ChdImageStream.cpp +++ b/Source/discimages/ChdImageStream.cpp @@ -82,5 +82,5 @@ uint64 CChdImageStream::Write(const void* buffer, uint64 size) uint64 CChdImageStream::GetTotalSize() const { - return m_unitCount * m_unitSize; + return m_unitCount * static_cast(m_unitSize); } diff --git a/Source/discimages/ChdImageStream.h b/Source/discimages/ChdImageStream.h index 3df82ce84a..1d4d73d77e 100644 --- a/Source/discimages/ChdImageStream.h +++ b/Source/discimages/ChdImageStream.h @@ -27,7 +27,7 @@ class CChdImageStream : public Framework::CStream std::unique_ptr m_baseStream; core_file* m_file = nullptr; chd_file* m_chd = nullptr; - uint32 m_unitCount = 0; + uint64 m_unitCount = 0; uint32 m_unitSize = 0; uint32 m_hunkSize = 0; uint64 m_position = 0;