From ad4d46a1f9c165e62caf5a994dbe6594a076d4dd Mon Sep 17 00:00:00 2001 From: Bruce Luckcuck Date: Wed, 11 Sep 2019 09:00:51 -0400 Subject: [PATCH] Add missing variable initialization in MSP_VTX_CONFIG If the `vtxDevice` was not valid then the `vtxStatus` variable never got initialized but was still used in the pit mode flag determination - leading to random behavior. --- src/main/msp/msp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/msp/msp.c b/src/main/msp/msp.c index bdd79664a..f627e45bd 100644 --- a/src/main/msp/msp.c +++ b/src/main/msp/msp.c @@ -1676,7 +1676,7 @@ static bool mspProcessOutCommand(uint8_t cmdMSP, sbuf_t *dst) case MSP_VTX_CONFIG: { const vtxDevice_t *vtxDevice = vtxCommonDevice(); - unsigned vtxStatus; + unsigned vtxStatus = 0; vtxDevType_e vtxType = VTXDEV_UNKNOWN; uint8_t deviceIsReady = 0; if (vtxDevice) {