Skip to content

Commit

Permalink
Merge pull request #18 from jerryneedell/jerryn_fix_byte
Browse files Browse the repository at this point in the history
 fix potential byte overflow exceptions
  • Loading branch information
dhalbert committed May 11, 2019
2 parents e1fbe45 + 242528d commit cb8f61b
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions adafruit_sdcard.py
Original file line number Diff line number Diff line change
Expand Up @@ -230,10 +230,10 @@ def _cmd(self, cmd, arg=0, crc=0, response_buf=None, data_block=True, wait=True)
# create and send the command
buf = self._cmdbuf
buf[0] = 0x40 | cmd
buf[1] = arg >> 24
buf[2] = arg >> 16
buf[3] = arg >> 8
buf[4] = arg
buf[1] = (arg >> 24) & 0xff
buf[2] = (arg >> 16) & 0xff
buf[3] = (arg >> 8) & 0xff
buf[4] = arg & 0xff
buf[5] = crc

with self._spi as spi:
Expand Down

0 comments on commit cb8f61b

Please sign in to comment.