Fix floating point exception in emulator
Merge pull request #335 from malachid/travis3

Fix floating point exception in emulator