Phillip Burgess 4 anni fa
parent
commit
0b6068e833
1 ha cambiato i file con 2 aggiunte e 1 eliminazioni
  1. 2 1
      Adafruit_GFX.cpp

+ 2 - 1
Adafruit_GFX.cpp

@@ -1661,7 +1661,8 @@ void Adafruit_GFX_Button::initButtonUL(Adafruit_GFX *gfx, int16_t x1,
   _textsize_y = textsize_y;
   _gfx = gfx;
   strncpy(_label, label, 9);
-  _label[9] = 0;  // strncpy does not place a null at the end. When 'label' is 9 characters, _label is not terminated.
+  _label[9] = 0; // strncpy does not place a null at the end.
+                 // When 'label' is >9 characters, _label is not terminated.
 }
 
 /**************************************************************************/