mirror of
https://github.com/shadps4-emu/ext-LibAtrac9.git
synced 2026-01-31 00:55:24 +01:00
Fix a validation range value, and incorrect stored data
This commit is contained in:
@@ -123,7 +123,7 @@ void CalculatePrecisions(Channel* channel)
|
||||
static const unsigned char BaseCurve[48] =
|
||||
{
|
||||
1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 4, 4, 5, 5, 6, 7, 8, 9, 10, 11, 12, 13,
|
||||
15, 6, 18, 19, 20, 21, 22, 23, 24, 25, 26, 26, 27, 27, 28, 28, 28, 29, 29,
|
||||
15, 16, 18, 19, 20, 21, 22, 23, 24, 25, 26, 26, 27, 27, 28, 28, 28, 29, 29,
|
||||
29, 29, 30, 30, 30, 30
|
||||
};
|
||||
|
||||
|
||||
@@ -169,11 +169,11 @@ static At9Status ReadGradientParams(Block* block, BitReaderCxt* br)
|
||||
{
|
||||
return ERR_UNPACK_GRAD_BOUNDARY_INVALID;
|
||||
}
|
||||
if (block->GradientStartUnit < 1 || block->GradientStartUnit >= 48)
|
||||
if (block->GradientStartUnit < 0 || block->GradientStartUnit >= 48)
|
||||
{
|
||||
return ERR_UNPACK_GRAD_START_UNIT_OOB;
|
||||
}
|
||||
if (block->GradientEndUnit < 1 || block->GradientEndUnit >= 48)
|
||||
if (block->GradientEndUnit < 0 || block->GradientEndUnit >= 48)
|
||||
{
|
||||
return ERR_UNPACK_GRAD_END_UNIT_OOB;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user