From db3796c384a3f210b3fe9587a9979fda8b2ed5d5 Mon Sep 17 00:00:00 2001 From: Louis Date: Tue, 21 Jan 2020 10:57:27 +0100 Subject: [PATCH] Fix upload --- src/clientP2P/ClientManagementUDP.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/clientP2P/ClientManagementUDP.java b/src/clientP2P/ClientManagementUDP.java index 486c541..a64aa48 100644 --- a/src/clientP2P/ClientManagementUDP.java +++ b/src/clientP2P/ClientManagementUDP.java @@ -81,7 +81,7 @@ public class ClientManagementUDP implements Runnable { switch (r[1]) { case "LOAD": int size = Integer.parseInt(r[2]); - if (r[3].length() != size + 1) { + if (r[3].length() != size - 1) { throw new TransmissionError(); } FileWriter fileWriter = new FileWriter(baseDirectory + filename);