Skip to content

Commit 8ede2eb

Browse files
committed
Merged revision(s) 22447 from trunk/OpenMPT:
[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
1 parent 2c4a844 commit 8ede2eb

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

soundlib/ITCompression.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,10 +154,11 @@ void ITCompression::CompressBlock(const typename Properties::sample_t *data, Smp
154154
{
155155
if(bwt[i] != width)
156156
{
157+
MPT_ASSERT(width >= 0);
157158
if(width <= 6)
158159
{
159160
// Mode A: 1 to 6 bits
160-
MPT_ASSERT(width);
161+
MPT_ASSERT(width != 0);
161162
WriteBits(width, (1 << (width - 1)));
162163
WriteBits(Properties::fetchA, ConvertWidth(width, bwt[i]));
163164
} else if(width < Properties::defWidth)

0 commit comments

Comments
 (0)