Blynk library for embedded hardware. Works with Arduino, ESP8266, Raspberry Pi, Intel Edison/Galileo, LinkIt ONE, Particle Core/Photon, Energia, ARM mbed, etc. http://www.blynk.cc/

Dependents:   Blynk_RBL_BLE_Nano Blynk_MicroBit Blynk_Serial Blynk_RBL_BLE_Nano

Revision:
18:c328c1a97f90
Parent:
16:6d9bf99b263c
Child:
19:bae78e167b11
--- a/Blynk/BlynkDebug.h	Tue Nov 28 00:44:42 2017 +0200
+++ b/Blynk/BlynkDebug.h	Wed Nov 29 14:05:41 2017 +0200
@@ -213,7 +213,7 @@
             bool prev_print = true;
             while (l2--) {
                 const uint8_t c = *octets++ & 0xFF;
-                if (c > 31) {
+                if (c >= 32 && c < 127) {
                     if (!prev_print) { BLYNK_PRINT.putc(']'); }
                     BLYNK_PRINT.putc((char)c);
                     prev_print = true;
@@ -253,13 +253,13 @@
         static
         void BLYNK_DBG_DUMP(const char* msg, const void* addr, size_t len) {
             BLYNK_LOG_TIME();
-            fprintf(BLYNK_PRINT, msg);
+            fprintf(BLYNK_PRINT, "%s", msg);
             int l2 = len;
             const uint8_t* octets = (const uint8_t*)addr;
             bool prev_print = true;
             while (l2--) {
                 const uint8_t c = *octets++ & 0xFF;
-                if (c > 31) {
+                if (c >= 32 && c < 127) {
                     if (!prev_print) { fputc(']', BLYNK_PRINT); }
                     fputc((char)c, BLYNK_PRINT);
                     prev_print = true;