From 0f56e5cbaf0b2e401bd3bb455b17d1f49c519929 Mon Sep 17 00:00:00 2001 From: Andy Spencer Date: Sun, 26 Apr 2015 22:12:51 +0000 Subject: [PATCH] Prevent crash with zero-length strings --- src/org/pileus/spades/Client.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/org/pileus/spades/Client.java b/src/org/pileus/spades/Client.java index e02e664..b56decd 100644 --- a/src/org/pileus/spades/Client.java +++ b/src/org/pileus/spades/Client.java @@ -118,6 +118,8 @@ public class Client public Message send(String txt) { + if (txt == null || txt.length() == 0) + return null; if (this.validate() != State.READY) return null; Message msg = new Message(this.channel, this.name, txt); -- 2.43.2