fixing overflow in 16->8 bit conversion, patch by (Nikolai Zhubr <s001 at hotbox...