From: David ‘Bombe’ Roden Date: Sun, 1 Oct 2017 15:06:48 +0000 (+0200) Subject: If DataLength can not be parsed, assume a length of 0 X-Git-Tag: v0.1.5^2~1 X-Git-Url: https://git.pterodactylus.net/?a=commitdiff_plain;h=5618b5c1d75357ad2e17da1d42997b4390aaf0da;p=jFCPlib.git If DataLength can not be parsed, assume a length of 0 --- diff --git a/src/main/java/net/pterodactylus/fcp/FcpConnection.java b/src/main/java/net/pterodactylus/fcp/FcpConnection.java index fbc2c13..3331bdf 100644 --- a/src/main/java/net/pterodactylus/fcp/FcpConnection.java +++ b/src/main/java/net/pterodactylus/fcp/FcpConnection.java @@ -290,7 +290,7 @@ public class FcpConnection implements Closeable { } else if ("UnknownNodeIdentifier".equals(messageName)) { fcpListenerManager.fireReceivedUnknownNodeIdentifier(new UnknownNodeIdentifier(fcpMessage)); } else if ("FCPPluginReply".equals(messageName)) { - InputStream payloadInputStream = getInputStream(FcpUtils.safeParseLong(fcpMessage.getField("DataLength"))); + InputStream payloadInputStream = getInputStream(FcpUtils.safeParseLong(fcpMessage.getField("DataLength"), 0)); fcpListenerManager.fireReceivedFCPPluginReply(new FCPPluginReply(fcpMessage, payloadInputStream)); } else if ("PluginInfo".equals(messageName)) { fcpListenerManager.fireReceivedPluginInfo(new PluginInfo(fcpMessage));