rifqiz / cpptweener

Automatically exported from code.google.com/p/cpptweener
0 stars 0 forks source link

UB in easeInOut #4

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. download source
2. open the file "CppTweener.cpp"
3. scroll to row 88

the statement "return -c/2 * (((t-2)*(--t)) - 1) + b;"

is undefined behavior due to using --t and t-2 in the same expression, where 
its not guaranteed to happen in left-to-right order.

Original issue reported on code.google.com by kristoff...@23c.se on 9 Aug 2012 at 9:05