Addition of a protection against int overflow
Merge pull request #6 from Ekhoo/master

Addition of a protection against int overflow