diff --git a/components/max7219/max7219.c b/components/max7219/max7219.c index fd8939c..5a59893 100644 --- a/components/max7219/max7219.c +++ b/components/max7219/max7219.c @@ -236,7 +236,7 @@ esp_err_t max7219_draw_text_7seg(max7219_t *dev, uint8_t pos, const char *s) { CHECK_ARG(dev && s); - while (s && pos < dev->digits) + while (*s != '\0' && pos < dev->digits) { uint8_t c = get_char(dev, *s); if (*(s + 1) == '.')