Fix the size of ByteBuffer

Fixes Atmosphere/atmosphere#1720