Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Screen::Cursor::shape is uninitialized when used #986

Open
dylanhart opened this issue Jan 9, 2025 · 0 comments
Open

Screen::Cursor::shape is uninitialized when used #986

dylanhart opened this issue Jan 9, 2025 · 0 comments

Comments

@dylanhart
Copy link

  • Screen::cursor_ is created using the default constructor of Screen::Cursor
  • Screen::Cursor::shape is not set in the default constructor
  • shape is later used without being set in places like ScreenInteractive::Draw(Component)

This has caused crashes and other weird behavior in some of my builds.

Related issues: #937 #602


Possible fix:

@@ -105,7 +105,7 @@ class Screen {
       BarBlinking = 5,
       Bar = 6,
     };
-    Shape shape;
+    Shape shape = Shape::Hidden;
   };
   Cursor cursor() const { return cursor_; }
   void SetCursor(Cursor cursor) { cursor_ = cursor; }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant