fix assertion bug
authorJosh Coalson <jcoalson@users.sourceforce.net>
Fri, 11 Oct 2002 06:24:33 +0000 (06:24 +0000)
committerJosh Coalson <jcoalson@users.sourceforce.net>
Fri, 11 Oct 2002 06:24:33 +0000 (06:24 +0000)
src/libFLAC/format.c

index ae719ba..c646247 100644 (file)
@@ -243,7 +243,10 @@ unsigned FLAC__format_get_max_rice_partition_order_from_blocksize_limited_max_an
        while(max_rice_partition_order > 0 && (blocksize >> max_rice_partition_order) <= predictor_order)
                max_rice_partition_order--;
 
-       FLAC__ASSERT(blocksize >> max_rice_partition_order > predictor_order);
+       FLAC__ASSERT(
+               (max_rice_partition_order == 0 && blocksize >= predictor_order) ||
+               (max_rice_partition_order > 0 && blocksize >> max_rice_partition_order > predictor_order)
+       );
 
        return max_rice_partition_order;
 }