From 0923dda54d269e22f3687972d872e68686e38616 Mon Sep 17 00:00:00 2001 From: prenticedavid Date: Wed, 20 Sep 2017 21:56:50 +0100 Subject: [PATCH] unrecogised ID in begin() makes WIDTH = 0 --- MCUFRIEND_kbv.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/MCUFRIEND_kbv.cpp b/MCUFRIEND_kbv.cpp index 301c352..3175f4f 100644 --- a/MCUFRIEND_kbv.cpp +++ b/MCUFRIEND_kbv.cpp @@ -2643,6 +2643,10 @@ case 0x4532: // thanks Leodino *p16 = 854; break; #endif + default: + p16 = (int16_t *) & WIDTH; + *p16 = 0; //error value for WIDTH + break; } _lcd_rev = ((_lcd_capable & REV_SCREEN) != 0); if (table8_ads != NULL) {