This patch fixes a subtle aliasing bug. gcc complains about type punning breaking strict aliasing rules and it's right. gcc could very well "mis-optimize" this piece of code. The patch attempts to accomplish the task more safely by using a union. Please review. Thanks! -David