Fixed overflow in local_thr results calculation
Merge pull request #522 from hintjens/master

Fixed overflow in results calculation