tehmaze/xmodem — pull request #3 by powertomato (2014-03-28 14:13:29+00:00)
Title: Fixed an issue with crc16, ...

... where the temporary result wasn't truncated to 16bit.

I'm using this library to communicate with an in-system-programmer for a microcontroller platform. I wanted to implement a verify feature and used xmodems calc_crc function, in order not to use another library. The following code would take forever (like 10-20 minutes) and return a long-integer, if the data set was large enough:

```python
modem = xmodem.XMODEM(None,None)
crc = modem.calc_crc(data)
```
Truncating the temporary results to 16 bit fixed the problem.