# HG changeset patch # User superdump # Date 1221752108 0 # Node ID fdd3e68dcf944182b84ec5cec1399014d7ab7a99 # Parent d0489fa75c418468a12416b28bf71961fd3c95a6 Cast the return value of get_bits() to signed integer such that the subtraction is conducted as a signed calculation. Patch by Alex Converse (alex converse gmail com) diff -r d0489fa75c41 -r fdd3e68dcf94 aac.c --- a/aac.c Thu Sep 18 15:13:15 2008 +0000 +++ b/aac.c Thu Sep 18 15:35:08 2008 +0000 @@ -979,7 +979,7 @@ } sign = get_bits(gb, 1); - scale = pow(2., pow(2., get_bits(gb, 2) - 3)); + scale = pow(2., pow(2., (int)get_bits(gb, 2) - 3)); if ((ret = decode_ics(ac, sce, gb, 0, 0))) return ret;