From abce4f1a139477c50560b8d0b175ab46dc2a30ff Mon Sep 17 00:00:00 2001 From: andrethomas Date: Thu, 10 Jan 2019 18:11:49 +0200 Subject: [PATCH] PN532: Prevent exception for S, --- sonoff/xsns_40_pn532_i2c.ino | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sonoff/xsns_40_pn532_i2c.ino b/sonoff/xsns_40_pn532_i2c.ino index b02c68591..2c34d0473 100644 --- a/sonoff/xsns_40_pn532_i2c.ino +++ b/sonoff/xsns_40_pn532_i2c.ino @@ -481,6 +481,10 @@ boolean PN532_Command(void) } if (!strcmp(subStr(sub_string, XdrvMailbox.data, ",", 1),"S")) { if (paramcount > 1) { + if (XdrvMailbox.data[XdrvMailbox.data_len-1] == ',') { + serviced = false; + return serviced; + } sprintf(sub_string_tmp,subStr(sub_string, XdrvMailbox.data, ",", 2)); uint8_t dlen = strlen(sub_string_tmp); if (dlen > 15) { dlen = 15; }