parser: check empty arg

This commit is contained in:
nkzawa
2017-07-11 18:16:49 +09:00
parent b2798fe85d
commit 115f32171d
2 changed files with 11 additions and 0 deletions

View File

@@ -76,6 +76,10 @@ public class Parser {
}
public static Packet<String> decodePacket(String data, boolean utf8decode) {
if (data == null) {
return err;
}
int type;
try {
type = Character.getNumericValue(data.charAt(0));