Serial library for MTS Socket Modem Arduino Shield devices from Multi-Tech Systems

Dependents:   mDot_AT_firmware mtsas mtsas MTDOT-EVB-LinkCheck-AL ... more

Revision:
13:643ad09fc0e0
Parent:
12:e12b79a4ab4f
diff -r e12b79a4ab4f -r 643ad09fc0e0 MTSBufferedIO.cpp
--- a/MTSBufferedIO.cpp	Thu Mar 23 16:15:14 2017 -0500
+++ b/MTSBufferedIO.cpp	Fri Sep 11 11:26:01 2020 -0500
@@ -16,14 +16,14 @@
 }
 
 int MTSBufferedIO::writef(const char* format, ...) {
-    char buff[256];
+    char buff[512];
 
     va_list ap;
     va_start(ap, format);
-    int len = vsnprintf(buff, 256, format, ap);
+    int len = vsnprintf(buff, 512, format, ap);
     while (!writeable())
         ;
-    write(buff, len);
+    write(buff, std::min<int>(len,512));
     va_end(ap);
     return len;
 }