removed another gcc warning by using an ugly cast
Fixed gcc "warning: integer overflow in expression [-Woverflow]"