Fixed unsigned overflow in sine alpha functions
This commit is contained in:
parent
c22543be1f
commit
5f8bd1d160
@ -1,3 +1,11 @@
|
||||
2007-06-11 Tomas Frydrych <tf@openedhand.com>
|
||||
|
||||
* clutter/clutter-alpha.c:
|
||||
(clutter_alpha_sine_inc):
|
||||
(clutter_alpha_sine_dec):
|
||||
(clutter_alpha_sine_half):
|
||||
Fixed unsigned overflow.
|
||||
|
||||
2007-06-11 Emmanuele Bassi <ebassi@openedhand.com>
|
||||
|
||||
* clutter/clutter-event.h: Add full modifier masks enums.
|
||||
|
@ -629,7 +629,7 @@ clutter_sine_inc_func (ClutterAlpha *alpha,
|
||||
|
||||
sine = clutter_sini (x) * CLUTTER_ALPHA_MAX_ALPHA;
|
||||
|
||||
return CFX_INT (sine);
|
||||
return ((guint32)sine) >> CFX_Q;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -663,7 +663,7 @@ clutter_sine_dec_func (ClutterAlpha *alpha,
|
||||
|
||||
sine = clutter_sini (x) * CLUTTER_ALPHA_MAX_ALPHA;
|
||||
|
||||
return CFX_INT (sine);
|
||||
return ((guint32)sine) >> CFX_Q;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -697,7 +697,7 @@ clutter_sine_half_func (ClutterAlpha *alpha,
|
||||
|
||||
sine = clutter_sini (x) * CLUTTER_ALPHA_MAX_ALPHA;
|
||||
|
||||
return CFX_INT (sine);
|
||||
return ((guint32)sine) >> CFX_Q;
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user