diff --git a/src/main/java/nsusbloader/Utilities/NxdtUsbAbi1.java b/src/main/java/nsusbloader/Utilities/NxdtUsbAbi1.java index 11299a1..afea175 100644 --- a/src/main/java/nsusbloader/Utilities/NxdtUsbAbi1.java +++ b/src/main/java/nsusbloader/Utilities/NxdtUsbAbi1.java @@ -184,7 +184,7 @@ class NxdtUsbAbi1 { final int fileNameLen = getLEint(message, 0x18); String filename = new String(message, 0x20, fileNameLen, StandardCharsets.UTF_8); - if (fileNameLen == 0 || fileNameLen > NXDT_FILE_PROPERTIES_MAX_NAME_LENGTH){ + if (fileNameLen <= 0 || fileNameLen > NXDT_FILE_PROPERTIES_MAX_NAME_LENGTH){ writeUsb(USBSTATUS_MALFORMED_REQUEST); logPrinter.print("Invalid filename length!", EMsgType.FAIL); return;