Skip to content

Commit

Permalink
Merged revision(s) 22447 from trunk/OpenMPT:
Browse files Browse the repository at this point in the history
[Ref] IT Compression: Make clang static analyzer happy.
........


git-svn-id: https://source.openmpt.org/svn/openmpt/branches/OpenMPT-1.30@22449 56274372-70c3-4bfc-bfc3-4c3a0b034d27
  • Loading branch information
manxorist committed Dec 2, 2024
1 parent 2c4a844 commit 8ede2eb
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion soundlib/ITCompression.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -154,10 +154,11 @@ void ITCompression::CompressBlock(const typename Properties::sample_t *data, Smp
{
if(bwt[i] != width)
{
MPT_ASSERT(width >= 0);
if(width <= 6)
{
// Mode A: 1 to 6 bits
MPT_ASSERT(width);
MPT_ASSERT(width != 0);
WriteBits(width, (1 << (width - 1)));
WriteBits(Properties::fetchA, ConvertWidth(width, bwt[i]));
} else if(width < Properties::defWidth)
Expand Down

0 comments on commit 8ede2eb

Please sign in to comment.