diff --git a/src/main/java/nsusbloader/Utilities/NxdtUsbAbi1.java b/src/main/java/nsusbloader/Utilities/NxdtUsbAbi1.java index 88ece45..10dd560 100644 --- a/src/main/java/nsusbloader/Utilities/NxdtUsbAbi1.java +++ b/src/main/java/nsusbloader/Utilities/NxdtUsbAbi1.java @@ -41,7 +41,7 @@ class NxdtUsbAbi1 { private boolean isWindows; - private static final int NXDT_COMMAND_SIZE = 0x1000; + private static final int NXDT_MAX_COMMAND_SIZE = 0x1000; private static final int NXDT_FILE_CHUNK_SIZE = 0x800000; private static final byte ABI_VERSION = 1; @@ -291,7 +291,7 @@ class NxdtUsbAbi1 { * 'null' if read failed * */ private byte[] readUsbDirective() throws Exception{ - ByteBuffer readBuffer = ByteBuffer.allocateDirect(NXDT_COMMAND_SIZE); + ByteBuffer readBuffer = ByteBuffer.allocateDirect(NXDT_MAX_COMMAND_SIZE); // We can limit it to 32 bytes, but there is a non-zero chance to got OVERFLOW from libusb. IntBuffer readBufTransferred = IntBuffer.allocate(1); int result;