Revert 4a16053c and avoid integer overflows in the addfactor calculation by exiting the loop early if count > 0x200. This provides stronger protection against overflows. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>