Commits

Travis Shirk committed 4ad8103

Whoa, when converting 0 to bytes... with the default padding of 0
you get '' and not '\x00' :O Changed default padding to 1 to get a 0 byte.

  • Participants
  • Parent commits a699366
  • Branches stable

Comments (0)

Files changed (1)

src/eyed3/utils/binfuncs.py

     return bin2dec(bytes2bin(bytes, sz))
 
 
-def dec2bin(n, p=0):
+def dec2bin(n, p=1):
     '''Convert a decimal value ``n`` to an array of bits (MSB first).
     Optionally, pad the overall size to ``p`` bits.'''
     assert(n >= 0)
     return retVal
 
 
-def dec2bytes(n, p=0):
+def dec2bytes(n, p=1):
     return bin2bytes(dec2bin(n, p))