Fix out-of-bounds error with moonphasenames array
Increased moonphasenames from [28] to [29] to include the last day before a new moon and avoid an out-of-bounds error causing sketch to crash.
-
#include <time.h>
#include <Adafruit_GFX.h> // Core graphics library
#include <Adafruit_EPD.h>
@@ -41,7 +40,7 @@ OpenWeatherMapForecastData owfdata[3];
Adafruit_NeoPixel neopixel = Adafruit_NeoPixel(1, NEOPIXELPIN, NEO_GRB + NEO_KHZ800);
- const char *moonphasenames[28] = {
+ const char *moonphasenames[29] = {
"New Moon",
"Waxing Crescent",
"Waxing Crescent",
@@ -69,6 +68,7 @@ Adafruit_NeoPixel neopixel = Adafruit_NeoPixel(1, NEOPIXELPIN, NEO_GRB + NEO_KHZ
"Waning Crescent",
"Waning Crescent",
"Waning Crescent",
+ "Waning Crescent",
"Waning Crescent"
};
