summaryrefslogtreecommitdiff
path: root/platform/linuxbsd/display_server_x11.cpp
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <rverschelde@gmail.com>2020-04-02 13:07:55 +0200
committerGitHub <noreply@github.com>2020-04-02 13:07:55 +0200
commit5f11e1557156617366d2c316a97716172103980d (patch)
tree288d8275067df46a8fc58e99184c74955de39bd8 /platform/linuxbsd/display_server_x11.cpp
parent7341a8fe1df65dc4d36aa49938575b6099764c0a (diff)
parent359bebd8c08a626e64ade1ac45c3c925352bd8a4 (diff)
Merge pull request #37504 from qarmin/out_of_bound_cursor
Fix array out of bounds access caused by uninitialised variables
Diffstat (limited to 'platform/linuxbsd/display_server_x11.cpp')
-rw-r--r--platform/linuxbsd/display_server_x11.cpp17
1 files changed, 9 insertions, 8 deletions
diff --git a/platform/linuxbsd/display_server_x11.cpp b/platform/linuxbsd/display_server_x11.cpp
index c2b5657081..786bc37bad 100644
--- a/platform/linuxbsd/display_server_x11.cpp
+++ b/platform/linuxbsd/display_server_x11.cpp
@@ -3374,6 +3374,15 @@ DisplayServerX11::DisplayServerX11(const String &p_rendering_driver, WindowMode
r_error = OK;
+ current_cursor = CURSOR_ARROW;
+ mouse_mode = MOUSE_MODE_VISIBLE;
+
+ for (int i = 0; i < CURSOR_MAX; i++) {
+
+ cursors[i] = None;
+ img[i] = NULL;
+ }
+
last_button_state = 0;
xmbstring = NULL;
@@ -3652,14 +3661,6 @@ DisplayServerX11::DisplayServerX11(const String &p_rendering_driver, WindowMode
for (int i = 0; i < CURSOR_MAX; i++) {
- cursors[i] = None;
- img[i] = NULL;
- }
-
- current_cursor = CURSOR_ARROW;
-
- for (int i = 0; i < CURSOR_MAX; i++) {
-
static const char *cursor_file[] = {
"left_ptr",
"xterm",