adafruit / Adafruit_FRAM_SPI

Driver for Adafruit's SPI-Based FRAM Breakouts
Other
35 stars 30 forks source link

Fix int overflow multiplications #23

Closed lwestfall closed 3 years ago

lwestfall commented 3 years ago

Fixes #22 for boards that use 16-bit ints, where these multiplications would result in an overflow. Addressed by evaluating these as unsigned longs.

I left the smaller multiplications alone, but if consistency is preferred let me know and I'll change them all to evaluate as long multiplication.

lwestfall commented 3 years ago

Sure thing! Change made as requested. Let me know if there's anything else to do.