Skip to content

Commit

Permalink
ChdImageStream: Fix image size computation.
Browse files Browse the repository at this point in the history
  • Loading branch information
jpd002 committed Jan 7, 2025
1 parent 3a1ed6d commit 178a466
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Source/discimages/ChdImageStream.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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<uint64>(m_unitSize);
}
2 changes: 1 addition & 1 deletion Source/discimages/ChdImageStream.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ class CChdImageStream : public Framework::CStream
std::unique_ptr<Framework::CStream> 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;
Expand Down

0 comments on commit 178a466

Please sign in to comment.