From a662b853dd5de7d47a8c5ebee3ae35cf66490d3f Mon Sep 17 00:00:00 2001 From: bruvzg <7645683+bruvzg@users.noreply.github.com> Date: Mon, 22 Jun 2020 13:13:22 +0300 Subject: [PATCH] Fix use uninitialized `ofs` variable introduced in 39701. (cherry picked from commit 439c97e0ff7b33fb1fc4e63353fb046efd8476b8) --- platform/windows/joypad_windows.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/platform/windows/joypad_windows.cpp b/platform/windows/joypad_windows.cpp index 19552ca972e..1abd2d162dd 100644 --- a/platform/windows/joypad_windows.cpp +++ b/platform/windows/joypad_windows.cpp @@ -220,6 +220,8 @@ void JoypadWindows::setup_joypad_object(const DIDEVICEOBJECTINSTANCE *ob, int p_ if (slider_count < 2) { ofs = DIJOFS_SLIDER(slider_count); slider_count++; + } else { + return; } } else return;