diff --git a/include/config.sample.h b/include/config.sample.h index 1faa716..7fcf5c3 100644 --- a/include/config.sample.h +++ b/include/config.sample.h @@ -3,7 +3,7 @@ #include #define FASTLED_INTERNAL #include -#include "prototypes.h" +#include "settings.h" //#define DEBUG // Uncomment this to enable Debug messages via Serial and, if enabled, MQTT. //#define CONFIG_USABLE // Uncomment this by removing the // at the beginning! diff --git a/src/Animation.cpp b/src/Animation.cpp index 5a54722..fbcf1f0 100644 --- a/src/Animation.cpp +++ b/src/Animation.cpp @@ -75,7 +75,7 @@ bool Animation::_load_from_file(const char* filename) { return false; } - if (file.available() != size - 6) { + if (file.available() < 0 || file.available() + 6 != size) { LOGln("Animation * Expected file to have %d bytes available, but found %d bytes available.", size - 6, file.available()); file.close(); return false; diff --git a/src/Window.cpp b/src/Window.cpp index 4448b28..77b4774 100644 --- a/src/Window.cpp +++ b/src/Window.cpp @@ -42,13 +42,13 @@ void Window::clear(CRGB* color) { } void Window::drawText(Font* font, uint16_t x, uint16_t y, String text, CRGB* color) { - for (int i=0; iwidth + 1))<<8), (y<<8), text[i], color); + for (uint16_t i=0; iwidth + 1))<<8)), (y<<8), text[i], color); } } void Window::drawSubText(Font* font, accum88 x, accum88 y, String text, CRGB* color) { - for (int i=0; iwidth + 1)<<8)), y, text[i], color); } } diff --git a/src/effect_matrix.cpp b/src/effect_matrix.cpp index e2ab435..33f8ff4 100644 --- a/src/effect_matrix.cpp +++ b/src/effect_matrix.cpp @@ -154,7 +154,7 @@ RandomMatrixEffect::RandomMatrixEffect() { RainbowMatrixEffect::RainbowMatrixEffect() { // No need to initialize _columns, because that will have been done by ctor of MatrixEffect. for (int i=0; iwidth; i++) { - delete columns[i]; + delete _columns[i]; _columns[i] = new RainbowMatrixEffectColumn(window, MatrixEffectColumn::DIR_SOUTH); } }