mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-14 10:36:34 +01:00
prevent subveclen to wrap at 2^31
fixes http://pastebin.com/X629ZE7F (Timecode 22h @48k, 512fpp) git-svn-id: svn://localhost/ardour2/branches/3.0@13528 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
parent
7b57d47e25
commit
ba7f951919
1 changed files with 2 additions and 2 deletions
|
|
@ -224,7 +224,7 @@ Curve::_get_vector (double x0, double x1, float *vec, int32_t veclen)
|
||||||
*/
|
*/
|
||||||
|
|
||||||
double frac = (min_x - x0) / (x1 - x0);
|
double frac = (min_x - x0) / (x1 - x0);
|
||||||
int32_t subveclen = (int32_t) floor (veclen * frac);
|
int64_t subveclen = (int64_t) floor (veclen * frac);
|
||||||
|
|
||||||
subveclen = min (subveclen, veclen);
|
subveclen = min (subveclen, veclen);
|
||||||
|
|
||||||
|
|
@ -242,7 +242,7 @@ Curve::_get_vector (double x0, double x1, float *vec, int32_t veclen)
|
||||||
|
|
||||||
double frac = (x1 - max_x) / (x1 - x0);
|
double frac = (x1 - max_x) / (x1 - x0);
|
||||||
|
|
||||||
int32_t subveclen = (int32_t) floor (original_veclen * frac);
|
int64_t subveclen = (int64_t) floor (original_veclen * frac);
|
||||||
|
|
||||||
float val;
|
float val;
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue