From e144cd713f28af1d525f62bcf379925f10aa7a61 Mon Sep 17 00:00:00 2001 From: David Holm Date: Sat, 29 Dec 2018 12:15:39 +0100 Subject: [PATCH] menu: Initialize variables before use Initialize `rdb` and `m` to zero at the top of `HandleUI` before they are accessed. --- menu.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/menu.cpp b/menu.cpp index ed79b8b..0f84160 100644 --- a/menu.cpp +++ b/menu.cpp @@ -678,12 +678,12 @@ void HandleUI(void) return; } - struct RigidDiskBlock *rdb; + struct RigidDiskBlock *rdb = nullptr; static char opensave; char *p; char s[40]; - unsigned char m, up, down, select, menu, right, left, plus, minus; + unsigned char m = 0, up, down, select, menu, right, left, plus, minus; uint8_t mod; unsigned long len; char enable;